Edit report at https://bugs.php.net/bug.php?id=45085&edit=1
ID: 45085 Updated by: ahar...@php.net Reported by: noah at dizzler dot com Summary: {} is better than [] for string access -Status: Closed +Status: Not a bug Type: Feature/Change Request Package: *General Issues PHP Version: 6CVS-2008-05-24 (CVS) -Assigned To: nikic +Assigned To: Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2012-04-13 20:30:21] ni...@php.net Closing this as PHP 6 doesn't exist anymore and {} is not deprecated in 5.4. ------------------------------------------------------------------------ [2008-05-24 01:00:22] noah at dizzler dot com 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 this bug report at https://bugs.php.net/bug.php?id=45085&edit=1