#44842 [Ctl->Csd]: parse_ini_file keys that start/end with underscore

From: Date: Sun, 17 Aug 2008 21:59:28 +0000
Subject: #44842 [Ctl->Csd]: parse_ini_file keys that start/end with underscore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128159@lists.php.net to get a copy of this message
ID: 44842 Updated by: lbarnaud@php.net Reported By: galactic dot void at googlemail dot com -Status: Critical +Status: Closed Bug Type: Filesystem function related Operating System: * PHP Version: 5.3CVS-2008-04-26 (snap) New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2008-04-26 17:12:21] galactic dot void at googlemail dot com Description: ------------ parse_ini_file cannot handle keys that start/end with an underscore. Reproduce code: --------------- // my.ini test = 1 _test = 2 test_ = 3 [section] test = 1 _test = 2 test_ = 3 // ini.php print_r(parse_ini_file('my.ini', true)); Expected result: ---------------- Array ( [test] => 1 [_test] => 2 [test_] => 3 [section] => Array ( [test] => 1 [_test] => 2 [test_] => 3 ) ) Actual result: -------------- Array ( [test] => 1 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44842&edit=1

« previous php.bugs (#128159) next »