#34354 [Opn]: parse_ini_file interprets "null" as empty string

From: Date: Sun, 04 Sep 2005 22:09:03 +0000
Subject: #34354 [Opn]: parse_ini_file interprets "null" as empty string
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969369882@lists.php.net to get a copy of this message
ID: 34354 Updated by: sniper@php.net Reported By: php dot net at sharpdreams dot com Status: Open -Bug Type: Filesystem function related +Bug Type: Documentation problem Operating System: Win32 PHP Version: 5CVS-2005-09-03 (snap) New Comment: reclassified Previous Comments: ------------------------------------------------------------------------ [2005-09-03 03:53:56] php dot net at sharpdreams dot com Description: ------------ The documentation is unclear on this aspect so I am presuming this is a bug: Keys in INI files set to null (no quotes) are parsed as empty string "" instead of a true null. If this is intended behavior then it should be documented as such. Reproduce code: --------------- -- test.ini -- [foo] bar = null -- test.php -- var_dump( parse_ini_file( "test.ini" ) ); Expected result: ---------------- array(1) { ["foo"]=> NULL } Actual result: -------------- array(1) { ["foo"]=> string(0) "" } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34354&edit=1

« previous php.doc (#969369882) next »