From: noah at dizzler dot com Operating system: PHP version: 6CVS-2008-05-24 (CVS) PHP Bug Type: Feature/Change Request Bug description: {} is better than [] for string access
Description: ------------ I am very upset that {} string access is being depreciated in PHP 6. $foo = 'bar'; $foo{2} = 't'; In my opinion... $foo{2} is MUCH easier to read and understand while developing, because you know exactly what it means, $foo[2] is ambiguous to read, and problematic during development because $foo could be an array or a string, and in either case the code will execute without errors or notices if $foo is not the vartype you intended it to be. -- Edit bug report at http://bugs.php.net/?id=45085&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45085&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45085&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45085&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45085&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45085&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45085&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45085&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45085&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45085&r=support Expected behavior: http://bugs.php.net/fix.php?id=45085&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45085&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45085&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45085&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45085&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45085&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45085&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45085&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45085&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45085&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45085&r=mysqlcfg