From:             mahesh dot vemula at in dot ibm dot com
Operating system: RHEL 4, Windows Xp
PHP version:      5CVS-2007-07-22 (CVS)
PHP Bug Type:     Performance problem
Bug description:  parse_ini_file() doesn’t give expected output with NO & NULL 
(reserved)keywords

Description:
------------
PHP engine doesn’t throw the expected parsing error (which is according to
doc, ”http://in2.php.net/manual/en/function.parse-ini-file.php.) with the
reserved keywords, NO and NULL given as keys in the .ini file. 
For the remaining reserved keywords php throws parsing error which is
expected according to doc.


Environment:
Operating System: Linux, Windows XP
PHP Version:PHP 5.2.4-dev (cli) (built: Jul 21 2007 19:21:35)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
Configure Setup: ./configure

Reproduce code:
---------------
Parse_ini_file.php:
<?php
$ini_array = parse_ini_file(dirname(__FILE__)."/parse.ini");
print_r($ini_array);
?>



parse.ini:
;start of ini file

[ReservedKeys_as_Keys]
;YES = "correct"
;expected parsing error
N0 = "wrong"
NULL = "wrong"

;end of ini file


Expected result:
----------------
PHP Warning:  Error parsing %s/parse.ini on line %d in
%s\parse_ini_file.php on line %d
Array
(
)


Actual result:
--------------
Array
(
    [N0] => wrong
    [NULL] => wrong
)


-- 
Edit bug report at http://bugs.php.net/?id=42071&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42071&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42071&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42071&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42071&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42071&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42071&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42071&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42071&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42071&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42071&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42071&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42071&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42071&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42071&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42071&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42071&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42071&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42071&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42071&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42071&r=mysqlcfg

Reply via email to