Skip to content

Commit c4d698f

Browse files
Implement suggestions by Tim Düsterhus
1 parent 23bf451 commit c4d698f

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

UPGRADING

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ PHP 8.6 UPGRADE NOTES
269269
constants).
270270

271271
- Standard:
272-
. ini_get_all() now includes a "default_value" element for each directive
273-
when $details is true. It holds the compiled-in default value of the
274-
directive (or null if it has none), independent of values set in php.ini,
275-
on the command line, or at runtime.
272+
. ini_get_all() now includes a "builtin_default_value" element for each
273+
directive when $details is true. It holds the built-in default value of
274+
the directive (or null if it has none), independent of values set in
275+
php.ini, on the command line, or at runtime.
276276

277277
========================================
278278
6. New Functions

ext/standard/basic_functions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,9 +1956,9 @@ PHP_FUNCTION(ini_get_all)
19561956
}
19571957

19581958
if (ini_entry->def->value) {
1959-
add_assoc_stringl(&option, "default_value", ini_entry->def->value, ini_entry->def->value_length);
1959+
add_assoc_stringl(&option, "builtin_default_value", ini_entry->def->value, ini_entry->def->value_length);
19601960
} else {
1961-
add_assoc_null(&option, "default_value");
1961+
add_assoc_null(&option, "builtin_default_value");
19621962
}
19631963

19641964
add_assoc_long(&option, "access", ini_entry->modifiable);

ext/standard/tests/general_functions/ini_get_all.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ array(3) {
3838
string(7) "1000000"
3939
["local_value"]=>
4040
string(7) "1000000"
41-
["default_value"]=>
41+
["builtin_default_value"]=>
4242
string(7) "1000000"
4343
["access"]=>
4444
int(7)
@@ -49,7 +49,7 @@ array(3) {
4949
string(1) "1"
5050
["local_value"]=>
5151
string(1) "1"
52-
["default_value"]=>
52+
["builtin_default_value"]=>
5353
string(1) "1"
5454
["access"]=>
5555
int(7)
@@ -60,7 +60,7 @@ array(3) {
6060
string(6) "100000"
6161
["local_value"]=>
6262
string(6) "100000"
63-
["default_value"]=>
63+
["builtin_default_value"]=>
6464
string(6) "100000"
6565
["access"]=>
6666
int(7)

ext/standard/tests/general_functions/ini_get_all_default_value.phpt renamed to ext/standard/tests/general_functions/ini_get_all_builtin_default_value.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
ini_get_all() exposes the compiled-in default_value independent of configuration and runtime changes
2+
ini_get_all() exposes the built-in default value independent of configuration and runtime changes
33
--INI--
44
precision=8
55
--FILE--
@@ -10,16 +10,16 @@ $all = ini_get_all(null, true);
1010

1111
var_dump($all["precision"]["global_value"]);
1212
var_dump($all["precision"]["local_value"]);
13-
var_dump($all["precision"]["default_value"]);
13+
var_dump($all["precision"]["builtin_default_value"]);
1414

15-
// A runtime change must not affect default_value.
15+
// A runtime change must not affect builtin_default_value.
1616
ini_set("precision", "3");
1717

1818
$all = ini_get_all(null, true);
1919

2020
var_dump($all["precision"]["global_value"]);
2121
var_dump($all["precision"]["local_value"]);
22-
var_dump($all["precision"]["default_value"]);
22+
var_dump($all["precision"]["builtin_default_value"]);
2323

2424
echo "Done\n";
2525
?>

ext/standard/tests/general_functions/ini_get_all_default_value_null.phpt renamed to ext/standard/tests/general_functions/ini_get_all_builtin_default_value_null.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
--TEST--
2-
ini_get_all() reports a null default_value for a directive that has no compiled-in default
2+
ini_get_all() reports a null built-in default value for a directive that has no compiled-in default
33
--INI--
44
error_append_string=FOO
55
--FILE--
66
<?php
77

88
// error_append_string is configured above, but it has no compiled-in default,
9-
// so default_value must be null regardless of configuration or runtime changes.
9+
// so builtin_default_value must be null regardless of configuration or runtime changes.
1010
$all = ini_get_all(null, true);
1111

1212
var_dump($all["error_append_string"]["global_value"]);
1313
var_dump($all["error_append_string"]["local_value"]);
14-
var_dump($all["error_append_string"]["default_value"]);
14+
var_dump($all["error_append_string"]["builtin_default_value"]);
1515

1616
ini_set("error_append_string", "BAR");
1717

1818
$all = ini_get_all(null, true);
1919

2020
var_dump($all["error_append_string"]["global_value"]);
2121
var_dump($all["error_append_string"]["local_value"]);
22-
var_dump($all["error_append_string"]["default_value"]);
22+
var_dump($all["error_append_string"]["builtin_default_value"]);
2323

2424
echo "Done\n";
2525
?>

0 commit comments

Comments
 (0)