php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47778 parse_ini_file can't define array with name "on"
Submitted: 2009-03-25 22:26 UTC Modified: 2009-04-21 03:12 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: fabien dot meynard at supinfo dot com Assigned: fa (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.2.9 OS: mac os x
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabien dot meynard at supinfo dot com
New email:
PHP Version: OS:

 

 [2009-03-25 22:26 UTC] fabien dot meynard at supinfo dot com
Description:
------------
When we use parse_ini_file function, we can't define a array with name "on"

But we can't find any reference of an reserver-keyword "on" in documentation

Reproduce code:
---------------
myArray[] = "php is good"
myArray[] = "asp is not good"

on[] = "linux"
on[] = "macos X"


print_r(parse_ini_file('file.ini'));

Expected result:
----------------
array(
  [myArray] => Array
    (
      [0] => "php is good"
      [1] => "asp is not good"
    )
   [on] => Array
    (
      [0] => "linux"
      [1] => "macos X"
    )
)

Actual result:
--------------
Warning: Error parsing file.ini on line 41 in index.php on line 2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-26 14:44 UTC] felipe@php.net
The keywords currently are: true, on, yes, false, off, no, none, null.

-> Documentation problem
 [2009-04-21 03:12 UTC] fa@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=d38553cb2eb9ccb5b4ab2eb562ab34df60a77db0
Log: fixed bug #47778
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 09:01:32 2025 UTC