From: fidian at rumkin dot com Operating system: Ubuntu Linus 12.04 PHP version: 5.3Git-2012-08-21 (Git) Package: Unknown/Other Function Bug Type: Bug Bug description:parse_ini_file() results changed in 5.3.15
Description: ------------ Given an INI file that looks like this ini = "a"b" and when you use parse_ini_file with INI_SCANNER_RAW, PHP used to return this as array('ini' => 'a"b') and now returns it as array('ini' => 'ab"'). This does not appear to match with Microsoft's GetPrivateProfileString (http://msdn.microsoft.com/en-us/library/ms724353(VS.85).aspx) where they say that values which are quoted with either single or double quotes are simply unquoted. My expected behavior would be to mirror the Microsoft parser, especially when in raw mode. Note: I am not talking about changing INI_SCANNER_NORMAL, just the raw mode so I can get the unparsed values. According to git-bisect, commit 4e6f27f4db6121e67f17906b27cc829120738b71 is the culprit, but I suspect that the fix for bug 51094 is really to blame. Test script: --------------- <?php error_reporting(0); $result = parse_ini_string('ini = "a"b"', false, INI_SCANNER_RAW); var_export($result); echo "\n"; Expected result: ---------------- array ( 'ini' => 'a"b', ) Actual result: -------------- array ( 'ini' => 'ab"', ) -- Edit bug report at https://bugs.php.net/bug.php?id=62884&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62884&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62884&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62884&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62884&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62884&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62884&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62884&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62884&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62884&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62884&r=support Expected behavior: https://bugs.php.net/fix.php?id=62884&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62884&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62884&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62884&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62884&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62884&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62884&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62884&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62884&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62884&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62884&r=mysqlcfg