ID: 29306 Updated by: [EMAIL PROTECTED] Reported By: wolf at exitec dot de Status: Open -Bug Type: Filesystem function related +Bug Type: Documentation problem -Operating System: Apache 2.0 +Operating System: * PHP Version: 4.3.8 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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