PHP constants and variables variable variables

Variable variable, this word is too lofty to explain. Looks very "bigger". It also has a name called a variable.

We think these names are not very scientific. After all, they are all imported things that have been translated.

A variable variable is actually a variable symbol before the declared variable.

Example:

Description of the above process: The value of $shu is 'biao' of the string. I add a $ (dollar sign) before $shu, which can be understood as the following transformation process:

$$shu
${$shu} Divide it into two pieces and look at it
${'biao'} interprets the variable $shu as biao
$biao and $biao is also a variable. The corresponding value is: mouse

You can write several variable variables yourself Just for fun, what is the result of running the following code?


Continuing Learning
||
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!