note 108079 added to function.parse-ini-file
| From: | Vicary | Date: | Tue, 27 Mar 2012 11:05:46 +0000 |
| Subject: | note 108079 added to function.parse-ini-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186836@lists.php.net to get a copy of this message | ||
The quote escaping behavior is actually quite unexpected, so keep in mind when you use it.
It works good with escaped quote (\") or new lines (\r\n), but not both. While the following
works fine (INI gives same result as PHP code),
INI: foo="\"bar\""
PHP: Array( 'foo' => '"bar"' )
INI: foo="foo
baz"
PHP: Array( 'foo' => "foo\nbaz" )
Using both \" and \n throws a parse error as the following line,
INI: foo="foo
\"baz\""
----
Server IP: 180.92.182.81
Probable Submitter: 59.148.205.58
----
Manual Page -- http://www.php.net/manual/en/function.parse-ini-file.php
Edit -- https://master.php.net/note/edit/108079
Del: integrated -- https://master.php.net/note/delete/108079/integrated
Del: useless -- https://master.php.net/note/delete/108079/useless
Del: bad code -- https://master.php.net/note/delete/108079/bad+code
Del: spam -- https://master.php.net/note/delete/108079/spam
Del: non-english -- https://master.php.net/note/delete/108079/non-english
Del: in docs -- https://master.php.net/note/delete/108079/in+docs
Del: other reasons-- https://master.php.net/note/delete/108079
Reject -- https://master.php.net/note/reject/108079
Search -- https://master.php.net/manage/user-notes.php