|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-11-15 12:27 UTC] cmb@php.net
-Type: Bug
+Type: Documentation Problem
-Package: *General Issues
+Package: PHP options/info functions
-Assigned To:
+Assigned To: cmb
[2021-11-15 12:27 UTC] cmb@php.net
[2021-11-15 12:44 UTC] git@php.net
[2021-11-15 12:44 UTC] git@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 12:00:01 2025 UTC |
Description: ------------ From the documentation, parse_ini_file() and parse_ini_string() should support value interpolation: var_dump(parse_ini_string(' foo = bar baz = ${foo} ')); should produce: array(2) { ["foo"]=> string(3) "bar" ["baz"]=> string(3) "bar" } but it produces this instead: array(2) { ["foo"]=> string(3) "bar" ["baz"]=> string(0) "" } See it live: https://3v4l.org/K15ft On the other hand, env var value interpolation seems to work: var_dump(parse_ini_string(' path = ${PATH} ')); result: array(1) { ["path"]=> string(13) "/usr/bin:/bin" } See it live: https://3v4l.org/cE4dL Test script: --------------- var_dump(parse_ini_string(' foo = bar baz = ${foo} ')); Expected result: ---------------- array(2) { ["foo"]=> string(3) "bar" ["baz"]=> string(3) "bar" } Actual result: -------------- array(2) { ["foo"]=> string(3) "bar" ["baz"]=> string(0) "" }