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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Fri Dec 27 09:01:29 2024 UTC