10-10-2010, 11:34 PM
|
#8 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Quote:
Originally Posted by Village Idiot
Interesting, I never knew one could do that... I do know that I will never use it though.
|
Absolutely the right stance to take.
A rare example of curly-brace-madness being useful comes from lovely web APIs provided by big names (here's looking at you Google and Yahoo!) which provide JSON-formatted responses containing identifiers like foo$bar or foo:bar which when converted directly to stdClass properties (via json_decode) cannot be accessed with the normal syntax (e.g. $object->foo$bar), calling for something like $object->{'foo$bar'} instead.
As for actual variables names, I can't think of the last time that I used the ${...} syntax for production code outside of a double-quoted string; I'm uncertain if it has ever happened.
Quote:
Originally Posted by delayedinsanity
... I just like coming up with fictional new ways to get back ...
|
How about you keep this kind of stuff to yourself, next time? Thanks. 
|
|
|
|