1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/standard/tests/general_functions/get_cfg_var_array.phpt
Nikita Popov 2f97bb6cfc Add test for get_cfg_var with array variable
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?
2019-04-12 15:12:45 +02:00

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"
}