给变量赋值时,PHP会分配一个zval来存值,而zval的结构中是没有变量名的。
在5.3之后版本改进了垃圾回收机制如果发现一个zval容器中的refcount在增加,说明不是垃圾如果发现一个zval容器中的refcount在减少,如果减到了0,直接当做垃圾回收如果发现一个zval容器中的refcount在减少,并没有减到0,PHP会把该值放到缓冲区,当做有可能是垃圾的怀疑对象当缓冲区达到临界值,PHP会自动调用一个方法取遍历每一个值,如果发现是垃圾就清理