PHP中的析构函数是否可预测?

前端之家收集整理的这篇文章主要介绍了PHP中的析构函数是否可预测?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
PHP中的类析构函数是否可预测?析构函数何时被调用

就像在许多语言中一样,只要对象超出范围,就会调用类析构函数吗?

PHP 5 introduces a destructor concept
similar to that of other
object-oriented languages,such as
C++. The destructor method will be
called as soon as all references to a
particular object are removed or when
the object is explicitly destroyed or
in any order in shutdown sequence.

http://php.net/manual/en/language.oop5.decon.php

原文链接:https://www.f2er.com/php/135068.html

猜你在找的PHP相关文章