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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrew at evilwalrus dot com
New email:
PHP Version: OS:

 

 [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 05 23:01:30 2024 UTC