#44575 [Opn]: parse_ini_file comment # line problems

From: Date: Wed, 02 Apr 2008 09:44:52 +0000
Subject: #44575 [Opn]: parse_ini_file comment # line problems
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-123856@lists.php.net to get a copy of this message
ID: 44575 User updated by: letssurf at gmail dot com Reported By: letssurf at gmail dot com Status: Open Bug Type: Filesystem function related Operating System: Linux 2.6.9-34 PHP Version: 5.3CVS-2008-03-31 (snap) New Comment: true. Shouldn't the function either report a parse error or using them as comments. Previous Comments: ------------------------------------------------------------------------ [2008-04-02 09:33:44] jani@php.net 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

« previous php.bugs (#123856) next »