diff options
author | Pierrick Charron <pierrick@php.net> | 2012-11-16 18:04:14 -0500 |
---|---|---|
committer | Pierrick Charron <pierrick@php.net> | 2012-11-16 18:04:14 -0500 |
commit | 6dff07aa8c6fcf6cd84a2d1726ffcaeef74b9969 (patch) | |
tree | 0993e717a43000b419da3e55349c525b86a3f2da /ext/standard/tests/file/bug63512.phpt | |
parent | 7468fc0e374ad8cd8db482e6c228cdaae8aed075 (diff) | |
download | php-git-6dff07aa8c6fcf6cd84a2d1726ffcaeef74b9969.tar.gz |
Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
Restore the old behavior but keep bug 51094 fixed
Diffstat (limited to 'ext/standard/tests/file/bug63512.phpt')
-rw-r--r-- | ext/standard/tests/file/bug63512.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/standard/tests/file/bug63512.phpt b/ext/standard/tests/file/bug63512.phpt new file mode 100644 index 0000000000..049db26588 --- /dev/null +++ b/ext/standard/tests/file/bug63512.phpt @@ -0,0 +1,33 @@ +--TEST-- +Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value). +--FILE-- +<?php + +$array = parse_ini_string(' + int = 123 + constant = INSTALL_ROOT + quotedString = "string" + a = INSTALL_ROOT "waa" + b = "INSTALL_ROOT" + c = "waa" INSTALL_ROOT + d = INSTALL_ROOT "INSTALL_ROOT"', false, INI_SCANNER_RAW); + +var_dump($array); +--EXPECTF-- +array(7) { + ["int"]=> + string(3) "123" + ["constant"]=> + string(12) "INSTALL_ROOT" + ["quotedString"]=> + string(6) "string" + ["a"]=> + string(18) "INSTALL_ROOT "waa"" + ["b"]=> + string(12) "INSTALL_ROOT" + ["c"]=> + string(18) ""waa" INSTALL_ROOT" + ["d"]=> + string(27) "INSTALL_ROOT "INSTALL_ROOT"" +} + |