somabc Posted October 18, 2010 Posted October 18, 2010 (edited) PHP variable variables; "variable variable takes the value of a variable and treats that as the name of a variable". Also, variable. And this is why I don't use PHP PHP: Variable variables - Manual Edited October 18, 2010 by somabc
Hightower Posted October 18, 2010 Posted October 18, 2010 And this is why I don't use PHP I'd rather the language I use have a feature that is not necessary to me, than not having a feature that is.
localzuk Posted October 18, 2010 Posted October 18, 2010 I've needed that functionality in the past. Glad PHP has it!
somabc Posted October 18, 2010 Author Posted October 18, 2010 It is fun. //You can even add more Dollar Signs $Bar = "a"; $Foo = "Bar"; $World = "Foo"; $Hello = "World"; $a = "Hello"; $a; //Returns Hello $$a; //Returns World $$$a; //Returns Foo $$$$a; //Returns Bar $$$$$a; //Returns a $$$$$$a; //Returns Hello $$$$$$$a; //Returns World //... and so on ...//
sonofsanta Posted October 19, 2010 Posted October 19, 2010 Things like that are the reason I love PHP so much for development; it's so damn flexible with its variables (I <3 no types) that you never end up digging through the manual to find the correct form for a datatype, or the function to typecast, you just get on with it. There's probably six different ways you could think of to do most things and PHP will probably let you code them all first time without too much hassle. .Net, on the other hand... great for the 5% of projects that are real quick 'n' dirty, great for the 5% at the other end where you build your library up, but for the other 90% in the middle it never had the flexibility of PHP for me.
somabc Posted October 19, 2010 Author Posted October 19, 2010 Reminds me of this Enterprise JavaScript - Provides proven high performance, enterprise-level and scalable JavaScript tips and best practices.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now