A syntax such as $$variable is called Variable Variable.
For example, if you consider this portion of code:
$real_variable="test";
$name="real_variable";
echo $$name;
You will get the following output:
test
Here:
$real_variablecontains'test'$namecontains the name of your variable:'real_variable'$$namemean “the variable thas has its name contained in$name”- Which is
$real_variable - And has the value
'test'
- Which is
EDIT after @Jhonny’s comment:
Doing a $$$?
Well, the best way to know is to try 😉
So, let’s try this portion of code:
$real_variable="test";
$name="real_variable";
$name_of_name="name";
echo $name_of_name . '<br />';
echo $$name_of_name . '<br />';
echo $$$name_of_name . '<br />';
And here’s the output I get:
name
real_variable
test
So, I would say that, yes, you can do $$$ 😉