php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54057 INI_SCANNER_RAW and parse_ini_file still doesnt return proper values
Submitted: 2011-02-21 02:55 UTC Modified: 2011-11-15 23:46 UTC
From: electroteque at gmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.3.5 OS: OSX 10.6
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: electroteque at gmail dot com
New email:
PHP Version: OS:

 

 [2011-02-21 02:55 UTC] electroteque at gmail dot com
Description:
------------
An ini config with values like

package.prop1 = true
package.prop2 = 100

Are supposed to be returned as boolean and numbers but are not. 

This is a bit of an oversight perhaps ? 

Your bug system is also buggy, I clicked submit it tried to bring up a list of bug 
reports, and it removes the package affected selection and the captcha has to be 
put back in. 

Test script:
---------------
$iniArray = parse_ini_file($filename, true, INI_SCANNER_RAW);

Expected result:
----------------
array(1) {
  ["package"]=>
  array(2) {
    ["prop1"]=>
    bool(true)
    ["prop2"]=>
    int(100)
  }
}

Actual result:
--------------
array(2) {
  ["prop1"]=>
  string(4) "true"
  ["prop2"]=>
  string(3) "100"
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-15 23:46 UTC] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

To reach what you want, you need to use:

package[prop1] = true
package[prop2] = 100
 [2011-11-15 23:46 UTC] felipe@php.net
-Status: Open +Status: Bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 11:02:27 2025 UTC