Bug->Req #52227 [Opn]: parse_ini_* does not parse namespaced constants
| From: | felipe@php.net | Date: | Sat, 03 Jul 2010 13:44:37 +0000 |
| Subject: | Bug->Req #52227 [Opn]: parse_ini_* does not parse namespaced constants | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-152054@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52227&edit=1
ID: 52227
Updated by: felipe@php.net
Reported by: wil dot moore at wilmoore dot com
Summary: parse_ini_* does not parse namespaced constants
Status: Open
-Type: Bug
+Type: Feature/Change Request
Package: Filesystem function related
Operating System: Linux, Mac, Windows
PHP Version: 5.3.2
New Comment:
Changed to feature request.
Previous Comments:
------------------------------------------------------------------------
[2010-07-01 20:58:55] wil dot moore at wilmoore dot com
Description:
------------
The parse_ini_file/parse_ini_string pair of functions do not expand
namespaced constants.
Test script:
---------------
<?php
namespace my;
const PROJECT_NAME = 'parse_ini_file_namespaced';
$ini = parse_ini_string(<<<EOF
[TEST_SECTION]
project.constant.global = PROJECT_NAME
project.constant.namspaced = my\PROJECT_NAME
EOF
);
var_export($ini);
Expected result:
----------------
array (
'project.constant.global' => 'parse_ini_file_namespaced',
'project.constant.namspaced' => 'my\\PROJECT_NAME',
)
Actual result:
--------------
array (
'project.constant.global' => 'PROJECT_NAME',
'project.constant.namspaced' => 'my\\PROJECT_NAME',
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52227&edit=1