Edit report at https://bugs.php.net/bug.php?id=38732&edit=1
ID: 38732 Comment by: technik at thomas-heuer dot eu Reported by: jm at powertrip dot co dot za Summary: Parse files with #'s in front of comments Status: Open Type: Feature/Change Request Package: Feature/Change Request Operating System: Linux / Windows / FreeBSD PHP Version: 5.1.6 Block user comment: N Private report: N New Comment: This is noted in the changelog for PHP 5.3.0: "Hash marks (#) may no longer be used as comments and will throw a deprecation warning if used." http://php.net/manual/en/function.parse-ini-file.php Previous Comments: ------------------------------------------------------------------------ [2006-09-06 10:42:14] jm at powertrip dot co dot za Description: ------------ # php -q generate-dlr.php Warning: Error parsing *snip* on line 279 in *snip* on line 77 *snip*(77) : Warning - Error parsing *snip* on line 279 Reproduce code: --------------- In /tmp/test.ini ;======================================================================= ; This is a comment ;======================================================================= [test] testing=test #====================================================================== # This is another comment #====================================================================== [foo] foo=bar And the following in /tmp/test.php <?php $ini = parse_ini_file("/tmp/test.ini", true); print_r($ini); Expected result: ---------------- Warning: Error parsing /tmp/test.ini on line 8 in /tmp/test.php on line 2 /tmp/test.php(2) : Warning - Error parsing /tmp/test.ini on line 8 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=38732&edit=1
