ID: 44442 User updated by: VJTD3 at VJTD3 dot com Reported By: VJTD3 at VJTD3 dot com Status: Open Bug Type: Filesystem function related Operating System: any PHP Version: 5.2.5 New Comment:
real files in real use in the real world don't go by that variation. anything right of the = is treated as plain text. there needs to be at bare minimum a flag to turn off the double quotes requirement. One example being the editing of third part programs where you can't just introduce double quotes and not have things break. Previous Comments: ------------------------------------------------------------------------ [2008-03-15 13:13:26] [EMAIL PROTECTED] Says the documentation: "Note: If a value in the ini file contains any non-alphanumeric characters it needs to be enclosed in double-quotes (")." "... Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value." ------------------------------------------------------------------------ [2008-03-15 10:33:24] VJTD3 at VJTD3 dot com Description: ------------ if a ini file has a "(" or ")" in it the parse_ini_file function will end on the character before the "(" or ")". in some cases or remove the "(" and ")" or just dump everything between the "(" and ")". In a nut shell it hates "(" and ")" for some reason. Reproduce code: --------------- sample "demo.ini" file: [demo] a=1 b=( c=3 php -r "print_r(parse_ini_file('demo.ini', true));" Expected result: ---------------- Array ( [demo] => Array ( [a] => 1 [b] => ( [c] => 3 ) ) Actual result: -------------- Warning: Error parsing demo.ini on line 3 Array ( [demo] => Array ( [a] => 1 [b] => ) ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44442&edit=1