mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
And fix incorrect variable shadowing in add_config_entry(). However, the test doesn't hit this case, as it requires a nested array. I'm not sure if it's possible to produce nested arrays from ini?
28 lines
323 B
PHP
28 lines
323 B
PHP
--TEST--
|
|
Using get_cfg_var() on an array ini value
|
|
--INI--
|
|
ary[a] = 1
|
|
ary[b] = 2
|
|
ary2[1] = a
|
|
ary2[2] = b
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(get_cfg_var('ary'));
|
|
var_dump(get_cfg_var('ary2'));
|
|
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
["a"]=>
|
|
string(1) "1"
|
|
["b"]=>
|
|
string(1) "2"
|
|
}
|
|
array(2) {
|
|
[1]=>
|
|
string(1) "a"
|
|
[2]=>
|
|
string(1) "b"
|
|
}
|