Edit report at http://bugs.php.net/bug.php?id=54183&edit=1
ID: 54183
Comment by: tomas dot brastavicius at quantum dot lt
Reported by: desplats at saficard dot com
Summary: parse_ini_string('prenom = LAI NO') syntax error,
unexpected BOOL_FALSE
Status: Open
Type: Bug
Package: Strings related
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Excerpt from http://php.net/manual/en/function.parse-ini-file.php
[If a value in the ini file contains any non-alphanumeric characters it
needs to be enclosed in double-quotes (")]
Code
<?php
echo parse_ini_string('prenom = "LAI NO"');
?>
works fine.
Previous Comments:
------------------------------------------------------------------------
[2011-03-07 16:41:29] desplats at saficard dot com
Description:
------------
When using parse_ini_string or parse_ini_file, if the value has a
substring as "NO" it causes a syntax error, unexpected BOOL_FALSE.
Test script:
---------------
<?php
echo parse_ini_string('prenom = LAI NO');
?>
Expected result:
----------------
Array
Actual result:
--------------
PHP Warning: syntax error, unexpected BOOL_FALSE in Unknown on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54183&edit=1