diff options
author | Felipe Pena <felipe@php.net> | 2010-06-24 22:32:42 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2010-06-24 22:32:42 +0000 |
commit | b355aa00b0a6dcf47793196ea7e14963132c2768 (patch) | |
tree | 5c6db07a458842a80c29d9e4d109da46149ce80f /ext/standard | |
parent | ee4818a12a2364de2430fb44d5f67159064f876e (diff) | |
download | php-git-b355aa00b0a6dcf47793196ea7e14963132c2768.tar.gz |
- Fixed bug #52138 (Constants are parsed into the ini file for section names)
Diffstat (limited to 'ext/standard')
-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) { + } +} |