parse_ini_file comment # line problems
| Doc Bug #44575 | parse_ini_file comment # line problems | ||||
|---|---|---|---|---|---|
| Submitted: | 2008-03-31 09:29 UTC | Modified: | 2009-08-07 14:59 UTC | ||
| From: | letssurf at gmail dot com | Assigned: | |||
| Status: | Closed | Package: | Documentation problem | ||
| PHP Version: | 5.3CVS-2008-11-01 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2008-03-31 09:29 UTC] 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 ( ) )
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-04-02 09:33 UTC] jani@php.net
[2008-04-02 09:44 UTC] letssurf at gmail dot com
[2008-04-02 10:28 UTC] jani@php.net
[2008-10-17 11:40 UTC] konstantin at symbi dot org
[2008-11-02 14:04 UTC] jani@php.net
[2008-11-02 23:39 UTC] lbarnaud@php.net
[2009-08-07 14:59 UTC] jani@php.net