There are some questions about the symbol table
1, so understanding right
(1) The symbol table is a key-value structure, just like a database. For each new variable, a record is added to the symbol table.
(2) When $a=1, add a piece of data to the symbol table, the key is a,value to the address of the memory, assuming 0x111222. When the $b= is $a, the value of B corresponds to 0x111222.
2, when $c = & $a, will be forced to separate. Some problems with obsessive-compulsive disorder come, who separates? Is 0x111222 this address is $b, or $a/$c?
3, about unset ($a), online information is said to be disconnected, how disconnected? Is it actually removing the $ A record from the symbol table?
------to solve the idea----------------------
$a = 12;
$b = $a;
$c = & $a;
echo $b. " _ ". $c; 12_12
$a = 15;
echo $b. " _ ". $c;//12_15
?>
& As a reference variable or function address, this & is similar to the C language pointer, $b = $a; just assign the value of variable A to the variable B, and when variable a changes, the variable B does not change
------to solve the idea----------------------
It feels like this:
$b = $a only assigns the value of A to B, and does not give the address to B;
$c =& $a is a reference assignment that separates the address of A to C, which means a is what C is.
unset ($a), disconnect, in fact, will be the address of a point to disconnect, such as you said 0x111222, just will be the point to disconnect the connection, but the value of this address still exists ....
Probably not very clear.
I hope I can help you.
------to solve the idea----------------------
1. Your understanding is correct
2. $c = & $a copy a $b $c, $a point to 0x111222
3.unset ($a) just remove $ A from symbol_table and put a $ A zval--recount if Recount==0 then GC
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.