#33873 [Opn]: parse_ini_file() bails out with parse error when "NO" is inside file

From: Date: Tue, 26 Jul 2005 20:10:35 +0000
Subject: #33873 [Opn]: parse_ini_file() bails out with parse error when "NO" is inside file
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969369351@lists.php.net to get a copy of this message
ID: 33873 Updated by: tony2001@php.net Reported By: eric at aplosmedia dot com Status: Open -Bug Type: Filesystem function related +Bug Type: Documentation problem Operating System: Windows XP; RHEL 3 PHP Version: 5.0.4 New Comment: no, on, off, yes, true, false, none are reserved words. That should be documented somewhere. Previous Comments: ------------------------------------------------------------------------ [2005-07-26 21:59:06] eric at aplosmedia dot com Description: ------------ If an INI file contains a definition such as NO = 667, php will bail out with a parse error. Warning: Error parsing /home/public_html/lookup.ini on line 147 in /home/public_html/start.php on line 24 This occurs on PHP 5.0.4 on Windows XP, RHEL 3 as well as php 4.3.11 on RHEL 3 (only platforms tested) Reproduce code: --------------- lookup.ini ==================== ; NETHERLANDS NL = 31 ; NORWAY NO = 47 ; NEW ZEALAND NZ = 64 PHP ==================== <?php print_r( parse_ini_file( './lookup.ini' ) ); ?> Expected result: ---------------- should return an array: Array ( [NL] => 31 [NO] => 47 [NZ] => 64 } Actual result: -------------- Warning: Error parsing /home/public_html/lookup.ini on line 147 in /home/public_html/start.php on line 24 Array ( [NL] => 31 } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33873&edit=1

« previous php.doc (#969369351) next »