"">
Please explain, please explain why the output of Mao is not 1,23;---1,23;----1,23; Good people have a safe life.
That——————————————
I will put the code here first, good people will have a safe life
echo '
function foo2(){
static $bar1;
$bar1 ;
echo "Befor unset: $bar1,
";
unset( $bar1 );
$bar1 = 23;
echo "after unset: $bar1\n
}
foo2 ();
foo2 ();
foo2 ();
?>
http://php.net/manual/zh/function.unset.php
The manual contains the sentence on the second floor, you can understand it
If you unset() a static variable in a function, the static variable will be destroyed inside the function. However, when this function is called again, this static variable will be restored to the value it had before it was last destroyed.
This is the original words of the document! ! !
There is no ‘-’ output in your code