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

From: Date: Mon, 14 Jul 2008 21:28:16 +0000
Subject: #44842 [Opn->Ctl]: parse_ini_file keys that start/end with underscore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126710@lists.php.net to get a copy of this message
ID: 44842 Updated by: jani@php.net Reported By: galactic dot void at googlemail dot com -Status: Open +Status: Critical Bug Type: Filesystem function related PHP Version: 5.3CVS-2008-04-26 (snap) 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 (#126710) next »