|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbug51094.diff (last revision 2012-06-07 13:32 UTC by pierrick@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-20 10:54 UTC] jani@php.net
[2010-02-20 20:00 UTC] viaujoc at videotron dot ca
[2011-09-25 10:27 UTC] pajoye@php.net
-Status: Bogus
+Status: Open
-Operating System: Win2003
+Operating System:
-PHP Version: 5.3.1
+PHP Version: *
[2011-09-25 10:27 UTC] pajoye@php.net
[2012-06-06 17:00 UTC] pierrick@php.net
[2012-06-06 17:06 UTC] pierrick@php.net
-Assigned To:
+Assigned To: pierrick
[2012-06-06 17:06 UTC] pierrick@php.net
[2012-06-07 13:32 UTC] pierrick@php.net
[2012-06-07 15:59 UTC] pierrick@php.net
[2012-06-07 16:24 UTC] pierrick@php.net
[2012-06-07 16:24 UTC] pierrick@php.net
-Status: Assigned
+Status: Closed
[2012-06-07 22:05 UTC] mattficken@php.net
[2012-06-08 01:21 UTC] pierrick@php.net
[2012-06-08 18:37 UTC] mattficken@php.net
[2014-10-07 23:24 UTC] stas@php.net
[2014-10-07 23:35 UTC] stas@php.net
[2015-07-21 12:11 UTC] as at crcl dot com
[2018-08-08 11:26 UTC] arekm at maven dot pl
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
Description: ------------ When using parse_ini_file() function with $scanner_mode=INI_SCANNER_RAW, any semi-colon (;) in the value is seen as the end of the value, even if it is enclosed in quotes. The behavior of parse_ini_file() in PHP 5.3 with either $scanner_mode at RAW or NORMAL cannot reproduce the behavior of PHP 5.2. Reproduce code: --------------- test.ini: [TheSection] MyKey="my;value\$" example.php: <?php var_dump(parse_ini_file("test.ini",true,INI_SCANNER_RAW)); ?> Expected result: ---------------- array(1) { ["TheSection"]=> array(1) { ["MyKey"]=> string(10) "my;value\$" } } Actual result: -------------- In PHP 5.2 (without the $scanner_mode parameter in parse_ini_file()): array(1) { ["TheSection"]=> array(1) { ["MyKey"]=> string(10) "my;value\$" } } (the value is returned exactly as it appears in test.ini) In PHP 5.3 (with $scanner_mode=INI_SCANNER_RAW): array(1) { ["TheSection"]=> array(1) { ["MyKey"]=> string(3) ""my" } } (notice that everything after the semi-colon has been truncated and the quote as the first character of the string) In PHP 5.3 (with $scanner_mode=INI_SCANNER_NORMAL): array(1) { ["TheSection"]=> array(1) { ["MyKey"]=> string(9) "my;value$" } } (notice the missing backslash (\) between the "e" and "$")