Home >Backend Development >PHP Tutorial >Under what circumstances will php variables be destroyed?
For example, the function method will be destroyed after execution. What else are there?
For example, the function method will be destroyed after execution. What else are there?
php uses reference counting to perform garbage collection. It is automatically triggered when certain conditions are met, or it can be triggered manually. Of course, you can also disable garbage collection, because the request will be cleaned up after the request is completed.
For garbage collection, you can read the manual: http://php.net/manual/zh/feat...