php program, the order in which destructors are executed, why is the object created first and executed last?
and the destructor is triggered when an Object is destroyed
in the Bird blog:
C, " " .
PHP, " " HastTable. , " "
HastTablezval
that said, when PHP parses, it doesn"t seem to prove that the variable name is stored in stack memory. Is it possible that the zval structure is stored in stack memory?
so, at the end of PHP, do you release the zval of all variables (objects) first? Or how to clean up the variable names and zval
one by one according to the variable table has become a first-in-first-out, stack space operation?
the only thing I can think of now is that the hash table is a two-dimensional array, the first layer stores each variable, the second layer stores the variable name and zval pointer of each variable, and the array of C language is stored in the stack space by default. When the PHP program ends, it is cleaned one by one according to the contents of this stack space, which leads to my question
, but I feel that my idea is based on the result, which is far-fetched and puzzled. Thank you all