#29306 [Opn->Csd]: wrong paragraph handling
| From: | vrana@php.net | Date: | Tue, 27 Jul 2004 09:44:18 +0000 |
| Subject: | #29306 [Opn->Csd]: wrong paragraph handling | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969362217@lists.php.net to get a copy of this message | ||
ID: 29306
Updated by: vrana@php.net
Reported By: wolf at exitec dot de
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: *
PHP Version: 4.3.8
New Comment:
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."
Previous Comments:
------------------------------------------------------------------------
[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