What is wrong with PHP's garbage collection mechanism?
A. The recycling algorithm used by PHP is the reference counting method. Each php variable is stored in a variable container called "zval".
B. A zval variable container, in addition to containing the type and value of the variable, also includes two bytes of extra information. The first is "is_ref", which is a bool value that identifies whether this variable belongs to a reference set. The second extra byte is "refcount", which indicates the number of variables (also called symbols) that point to this zval variable container.
C. Assigning a variable to another variable does not increase the reference count (refcount) when any variable associated with a variable container leaves its scope (such as the end of the function execution), or the function unset () is called on the variable "Refcount" will decrease by 1
D. The variable container is destroyed when "refcount" becomes 0
Answer:C
What is wrong with PHP's garbage collection mechanism?
A. The recycling algorithm used by PHP is the reference counting method. Each php variable is stored in a variable container called "zval". B. A zval variable container, in addition to containing the type and value of the variable, also includes two bytes of extra information. The first is "is_ref", which is a bool value that identifies whether this variable belongs to a reference set. The second extra byte is "refcount", which indicates the number of variables (also called symbols) that point to this zval variable container. C. Assigning a variable to another variable does not increase the reference count (refcount) when any variable associated with a variable container leaves its scope (such as the end of the function execution), or the function unset () is called on the variable "Refcount" will decrease by 1 D. The variable container is destroyed when "refcount" becomes 0