diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/tests/general_functions/bug52138.data | 11 | ||||
| -rw-r--r-- | ext/standard/tests/general_functions/bug52138.phpt | 37 |
2 files changed, 48 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/bug52138.data b/ext/standard/tests/general_functions/bug52138.data new file mode 100644 index 0000000000..4ce82e0973 --- /dev/null +++ b/ext/standard/tests/general_functions/bug52138.data @@ -0,0 +1,11 @@ +[MYCONST] +MYCONST = MYCONST + +[M_PI] +FOO=M_PI " test" + +[foo::bar] +A=1 +B=A "A" A + +[MYCONST M_PI] diff --git a/ext/standard/tests/general_functions/bug52138.phpt b/ext/standard/tests/general_functions/bug52138.phpt new file mode 100644 index 0000000000..d4f38735ab --- /dev/null +++ b/ext/standard/tests/general_functions/bug52138.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #52138 (Constants are parsed into the ini file for section names) +--FILE-- +<?php + +define('MYCONST', 1); +define('A', 'B'); + +$ini_file = dirname(__FILE__)."/bug52138.data"; + +$ret = parse_ini_file($ini_file, true); +var_dump($ret); + +?> +--EXPECTF-- +array(4) { + ["MYCONST"]=> + array(1) { + ["MYCONST"]=> + string(1) "1" + } + ["M_PI"]=> + array(1) { + ["FOO"]=> + string(%d) "3.%d test" + } + ["foo::bar"]=> + array(2) { + ["A"]=> + string(1) "1" + ["B"]=> + string(3) "BAB" + } + ["MYCONST M_PI"]=> + array(0) { + } +} |
