The php interview questions are as follows:
Copy the code The code is as follows:
$a = 1;
$x =&$a;
$b=$a++;
?>
Q:
What are the values of $b and $x?
The answers to php interview questions are as follows:
$b = 1;
$x = 2;
Do you understand? If you don’t understand, think about it again. When a variable is equal to a reference to another variable, if either party changes its value, the value seen by the other party will also change. If you add it before, it will show up this time, and if you add it after, it will show up next time.
The above introduces PHP variable reference. An interview question about PHP variable reference, including PHP variable reference. I hope it will be helpful to friends who are interested in PHP tutorials.