php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20331 parse_ini_file() doesn't parse multiple keys
Submitted: 2002-11-09 20:04 UTC Modified: 2002-11-09 20:13 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: andrew at evilwalrus dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.3.0-pre2 OS: WinNT (XP)
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
2 + 19 = ?
Subscribe to this entry?

 
 [2002-11-09 20:04 UTC] andrew at evilwalrus dot com
--- Original INI File (1.ini) ---
[MAIN]
key1=foo
key2=bar

[BAZ]
foo=1
foo=2
foo=3

--- End INI File ---

Upon using parse_ini_file() to parse out the keys and section names, i noticed that the function doesn't recoginize multiple keys (as in the [BAZ] section).  It simply returns the last key of that name, and that's it.

It'd be in well interest if this could be fixed to return the array of the keynames, instead of the last given key.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-09 20:05 UTC] andrew at evilwalrus dot com
Also, this `bug' has beeen experienced in all my past releases of PHP, not just 4.3.0-pre2.
 [2002-11-09 20:13 UTC] rasmus@php.net
Why do you think it is a bug?  It has never supported arrays and introducing it would probably break BC in nasty ways.  So this is at best a feature request that is unlikely to be addressed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 16:01:29 2024 UTC