|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-01-25 00:30 UTC] webmaster at dreamsee dot biz
Description:
------------
PHP 5.1.2 cannot handle "{}" in key names, so same code that works on PHP 4.x and 5.0.x, won't work.
Almost same problem described in bug http://bugs.php.net/bug.php?id=33574, but since then it was not added in documentation and it bit different problems, as there it about values, but here problem with keys.
Reproduce code:
---------------
parser.php:
<?php
$ini = parse_ini_file ("./default.lang.php4", true);
echo '<pre>';
print_r($ini);
?>
default.lang.php4:
;<?php exit;?>
[common]
{charset} = "windows-1251"
{title} = "some title"
[check.php]
{fail} = "fail here"
Expected result:
----------------
Array
(
[common] => Array
(
[{charset}] => windows-1251
[{title}] => some title
)
[check.php] => Array
(
[{fail}] => fail here
)
)
Actual result:
--------------
Warning: Error parsing ./default.lang.php4 on line 4 in /home/webadmin/unixro.net/tmp/parser.php on line 2
Array
(
[common] => Array
(
)
)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 11:00:02 2025 UTC |
The problem is that it cannot be solved by doublequotes (") like in bug #33574. Have no solution for now.