+ 2
Variable Variables
I'm little bit confused with variable variables $a.
2 Réponses
+ 4
@schindlabua you confused me😵
+ 2
It's a really obscure feature you will never need!
But yeah, here's an example:
$color = "red";
$thing = "color";
$thing == "color", therefor
$thing == $color == "red".
And `echo $thing` will print "red".
It's always nice to know about the depths of your language because sometimes it may come in handy, but variable variables are just too deep. I haven't used them once, and I have never even seen code by others that uses them. I don't think there is a usecase.