#29306 [Csd->Opn]: parse_ini_file and octal values

From: Date: Thu, 02 Aug 2007 14:26:58 +0000
Subject: #29306 [Csd->Opn]: parse_ini_file and octal values
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969377215@lists.php.net to get a copy of this message
ID: 29306 Updated by: philip@php.net -Summary: wrong paragraph handling Reported By: wolf at exitec dot de -Status: Closed +Status: Open Bug Type: Documentation problem Operating System: * PHP Version: 4.3.8 New Comment: This was fixed here: http://bugs.php.net/bug.php?id=41445 And the expected result will show up as of 5.2.4. Reopening this report, be sure to update to the new doc style and utilize the changelog. Previous Comments: ------------------------------------------------------------------------ [2004-07-27 11:44:17] vrana@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. "Keys and section names consisting from numbers are evaluated as PHP integers thus numbers starting by 0 are evaluated as octals and numbers starting by 0x are evaluated as hexadecimals." ------------------------------------------------------------------------ [2004-07-27 04:43:15] curt@php.net Items starting with 0 are treated as an octal value, since 0815 is an invalid octal value it will return 0, the octal value of 01 is 1, thus your results. I'm changing this a problem with the documentation. ------------------------------------------------------------------------ [2004-07-21 16:32:14] wolf at exitec dot de Description: ------------ the parse_ini_file doesn't work as in older php-versions: the paragraph starting with 0... (for example 0815) wasn't handled correctly. please create the following test.ini file [01] e=e f=f [02] g=g h=h [1] a=a b=b [2] c=c d=d [0815] bla=bla Reproduce code: --------------- print_r(parse_ini_file("test.ini",true)); Expected result: ---------------- Array ( [01] => Array ( [e] => e [f] => f ) [02] => Array ( [g] => g [h] => h ) [1] => Array ( [a] => a [b] => b ) [2] => Array ( [c] => c [d] => d ) [0815] => Array ( [bla] => bla ) ) Actual result: -------------- Array ( [1] => Array ( [a] => a [b] => b ) [2] => Array ( [c] => c [d] => d ) [0] => Array ( [bla] => bla ) ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29306&edit=1

« previous php.doc (#969377215) next »