ini_get_all() Includes The Built-in Default Value¶
ini_get_all() used to return, for each directive, only the global_value, local_value and access keys. In PHP 8.6, a fourth key, builtin_default_value, is added, containing the value that is hard-coded in PHP itself, regardless of any php.ini or ini_set() change.
PHP code¶
<?php
$all = ini_get_all('core', true);
var_dump($all['precision']);
?>
Before¶
array(3) {
[global_value]=>
string(2) 14
[local_value]=>
string(2) 14
[access]=>
int(7)
}
After¶
array(4) {
[global_value]=>
string(2) 14
[local_value]=>
string(2) 14
[builtin_default_value]=>
string(2) 14
[access]=>
int(7)
}
PHP version change¶
This behavior changed in 8.6