|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29539 a small reqeust for parse_ini_file()
Submitted: 2004-08-05 17:36 UTC Modified: 2004-08-06 11:53 UTC
From: amir at foresthc dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 - 14 = ?
Subscribe to this entry?

 [2004-08-05 17:36 UTC] amir at foresthc dot com
It would be nice if the parse_ini_file() would return multiple keys with the same name as an array, instead of just overwriting the previous one.

I know there is one previous "bug report" for this request, but I was affraid that just adding a comment to a closed bug might go un-noticed.

Regarding BC, but I guess that can be addressed by a second optional boolean argument.

10x anyway.

Reproduce code:
    key1 = value1
    key2 = value2
    key2 = value3

Expected result:
    [section] => Array
            [key1] => "value1"
            [key2] => Array
                    [0] => "value2"
                    [1] => "value3"

Actual result:
    [section] => Array
            [key1] => "value1"
            [key2] => "value3"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-06 08:44 UTC]
A boolean argument to what? IMO if this is to be added, you should specify your settings like this:
    key1 = value1
    key2[] = value2
    key2[] = value3

That makes it clear and also addresses the BC issue.
 [2004-08-06 11:51 UTC] amir at foresthc dot com
And that is actually the *current* behaviour...

I can't seem to find it documented anywhere.

Well I guess we can close the bug...
 [2004-08-06 11:53 UTC] amir at foresthc dot com
The requested behaviour is already implemeted as described above...
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 22:01:28 2024 UTC