$long="big_long_variable_name";
$$long= "PHP"; /* Use the string stored in the variable $long as the variable name of the new variable, which is equivalent to $big_long_variable_name="PHP"; */
$short=& $big_long_variable_name; /* Get the variable $big_long_variable_name The value of is assigned to the variable $short. At this time, the value of $short is "PHP", which is equivalent to $short=& $$long; */
print "01 /$short is $short."; /* "/ $" is an escape sequence, indicating that a dollar sign $ is output, the same below. The function of this statement is to output: 01 $short is PHP. */
print "02 Long is $big_long_variable_name."; /* Output: 02 Long is PHP. */
?>
< br />
print "03 /$short is $short"; /* Output: 03 $short is PHP rocks! */
print "04 Long is $big_long_variable_name"; /* Output: 04 Long is PHP rocks ! */
?>
05 $short is PHP rocks!
06 Long is PHP rocks!
< ;br />
print "07 /$short is $short"; /* Output: 07 $short is PHP rocks! Programming PHP rocks! */
print "08 Long is $big_long_variable_name"; /* Due to variable $ short is reassigned to Programming PHP rocks!, so the value of variable $big_long_variable_name is also changed to "PHP rocks! Programming PHP rocks!" together with $short. Output of this statement: 08 Long is PHP rocks! Programming PHP rocks! Note that if a variable with the same value is destroyed by unset(), the other variable does not apply to this situation, that is, it will not be destroyed together. . */
?>
09 $short is Programming PHP rocks!
10 Long is Programming PHP rocks!
print "11 /$short is $short"; /* Output: 11 PHP rocks!Programming PHP rocks!Web Programming PHP rocks!Programming PHP rocks! */
print "12 Long is $big_long_variable_name" ;
?>
unset($big_long_variable_name); /* Use unset() to destroy the variable$ big_long_variable_name, the variable $short will not be affected in any way. */
print "13 /$short is $short"; /* Although the variable $big_long_variable_name is destroyed, $short is not affected, and its value is still the most recently assigned PHP rocks!Programming PHP rocks!Web Programming PHP rocks! Programming PHP rocks! */
print "14 Long is $big_long_variable_name."; /* The variable $big_long_variable_name has been destroyed, so it has no value. Output: 14 Long is. */
snow; TEST1"; /* Re-assign the variable $short. Since there is no . (dot) added after $short this time, the current value of $short is "No point TEST1". */
print "15 /$short is $short."; /* Output: 15 $short is No point TEST1. */
$short="No point TEST2 $short"; /* Re-align the variables $short assignment. No . (dot) is added after $short, but its latest value "No point TEST1" is quoted. */
print "16 /$short is $short."; /* Output: 16 $short is No point TEST2 No point TEST1. */
http://www.bkjia.com/PHPjc/621676.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/621676.htmlTechArticleCopy the code as follows: ?php $long="big_long_variable_name"; $$long="PHP";/* Use the string stored in the variable $long as the variable name of the new variable, which is equivalent to $big_long_variable_name...