ID: 44575 Updated by: [EMAIL PROTECTED] Reported By: letssurf at gmail dot com -Status: Assigned +Status: Critical Bug Type: Filesystem function related Operating System: * PHP Version: 5.3CVS-2008-11-01 Assigned To: helly New Comment:
This really should be solved before PHP 5.3.0 goes out. Might otherwise cause pretty hard to find secondary "bugs". Previous Comments: ------------------------------------------------------------------------ [2008-10-17 11:40:00] konstantin at symbi dot org the behaviour which stops parsing on '#' breaks compatibility with php 5.2. at least it should be documented, and an error/warning raised, but i do not understand the reason of breaking BC. ------------------------------------------------------------------------ [2008-04-02 10:28:31] [EMAIL PROTECTED] Yes, that's why I didn't bogus this. Propably we could allow # as comment too, but I'd still reserve it for #if..#else..#endif style constructs. Marcus, what's the deal with that? ------------------------------------------------------------------------ [2008-04-02 09:44:51] letssurf at gmail dot com true. Shouldn't the function either report a parse error or using them as comments. ------------------------------------------------------------------------ [2008-04-02 09:33:44] [EMAIL PROTECTED] Just FYI: # is not a comment in ini files. ; is. ------------------------------------------------------------------------ [2008-03-31 09:29:31] letssurf at gmail dot com Description: ------------ Any lines with comments starting with a # cause ini parsing to stop. Reproduce code: --------------- -- File: config.ini -- ; this is a comment [section1] # this is a comment name = value # this a comment -- File: test.php -- <?php $ini = parse_ini_file('config.ini', true); print_r($ini); Expected result: ---------------- Array ( [section1] => Array ( [name] => value ) ) Actual result: -------------- Array ( [section1] => Array ( ) ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44575&edit=1