# dropping curly braces

- Thread: https://externals.io/message/20163
- Original archive: https://news-web.php.net/php.internals/20163
- Started by boots on 2005-11-18T16:09:07+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #20163 — boots — 2005-11-18T16:09:07+00:00

URL: https://externals.io/message/20163#20163

Hi.

Is there really a good reason to drop {} string access? Does it make
the engine better? Are you going to use {} for something else? If not,
then wouldn't it make logical sense to do what was documented and drop
the [] syntax? Sure, I've read the argument that [] is used in other
languages but as we all know, PHP != (insert language) so that is not
really valid. I've read the argument that [] "makes more sense" but
obviously it has long ago been decided and documented otherwise. I've
read that dropping [] will break apps -- but that is equally true for
{}. There seems to be no reason for this other than whim and that
leaves a sour taste.

Yes, we will update our codebases (thanks for the extra and pointless
work, btw) but not to [] for string access but rather `substr()` which I
hope is safer long-term. Future proofing is getting much harder because
now we can't even rely on documented behaviours and existing
deprecation notices. Some people will say, "Oh, it is safe to use [] so
don't worry" but it seems that these same people said that about {}. If
this makes PHP better in some way I could see the need but as it is, it
seems like a pity to me.

Best.


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
