For more information, refer to: http://www.jb51.net/article/22508.htm
When I look at a piece of article about quoting,
The author says the result is 2,
I think the result is 3,
After the operation, the result is actually 1.
Beginner PHP, the reference to it is not very understanding Ah,,,,,,
Reply to discussion (solution)
Excuse me, do you have any questions?
Tell me about your problem.
How else would I answer you?
Function demo (& $a, & $b) {$a = $b;} This operation is 2
For the sake of description, change the name of the formal parameter
Function Demo (& $x, & $y) {
& $x is another form of representation of global $a
So
$x =& $y;
It is
Global $a;
$a =& $y;
I hope you can understand that.
The manual has:
if a variable declared as global is assigned to a reference within a function, the reference is only visible inside the function.
I'm not going to say anything anymore.