ID: 34274
Updated by: [EMAIL PROTECTED]
Reported By: php dot net at sharpdreams dot com
Status: Open
-Bug Type: PHP options/info functions
+Bug Type: Feature/Change Request
Operating System: Win32/Apache2
PHP Version: 5CVS-2005-08-26 (snap)
New Comment:
This is not really bug but feature request. (nobody said it works with
parse_ini_file(), did they?)
Previous Comments:
------------------------------------------------------------------------
[2005-08-26 22:23:09] php dot net at sharpdreams dot com
Description:
------------
On the documentaiton page of php.ini, it states:
" Since PHP 5.1.0, it is possible to refer to existing .ini variables
from within .ini files. Example: open_basedir = ${open_basedir}
":/new/dir"."
This does not seem to work in 5.1 for parse_ini_file.
Also, it appears there is no way to reference sections, e.g.,
baz = ${section.foo}
That would be nice. Very nice, in fact (regardless of syntax required).
Reproduce code:
---------------
--- file.ini ---
[Test]
foo = bar
baz = ${foo}
--- test.php ---
<?php
$ini = parse_ini_file( "file.ini", true );
var_dump( $ini );
?>
Expected result:
----------------
array(1) {
["Test"]=>
array(2) {
["foo"]=>
string(3) "bar"
["baz"]=>
string(3) "bar"
}
}
Actual result:
--------------
array(1) {
["Test"]=>
array(2) {
["foo"]=>
string(3) "bar"
["baz"]=>
string(0) ""
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34274&edit=1