News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Reddit.com:
Today I learned about variable variables...
October 21, 2010 @ 12:05:30

Over on Reddit.com there's an interesting post (yes, despite some of the comments made on it) about variable variables that turns into a detailed look at PHP variable handling as based around "$".

OK, here's the thing: [variable variables are] only the entrance of the rabbit hole. [...] The first thing to understand is what $ is. $ is actually a shorthand for ${} and means "return the value of the variable whose name is contained in this".

The response goes on to talk about variable names as strings, a few string handling tricks that can be used when referencing them and how this works with objects too. Things get a bit more complicated when they start adding in more levels of "variable" and evaluations based on random results. Not overly useful information for the casual developer, but interesting to know none the less.

0 comments voice your opinion now!
variable variable detail guide handling


blog comments powered by Disqus

Similar Posts

Jonnay\'s Blog: An issue with PHP\'s error handling

Zend Developer Zone: Interview w/Francois Zaninotto & Fabien Potencier (Definitive Guide to symfony)

Kore Nordmann's Blog: Installing cairo_wrapper on Gentoo

Richard Davey's Blog: WAMP Guide updated for PHP 5.2.3

Matthew Weier O'Phinney's Blog: How to Contribute to ZF2


Community Events





Don't see your event here?
Let us know!


release api unittest developer application configure wordpress introduction code list threedevsandamaybe library interview podcast laravel community install series bugfix language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework