|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-05-24 01:00 UTC] 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 17:00:02 2025 UTC |
Closing this as PHP 6 doesn't exist anymore and {} is not deprecated in 5.4.