加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

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

发布时间:2020-12-13 18:14:17 所属栏目:PHP教程 来源:网络整理
导读:PHP中的类析构函数是否可预测?析构函数何时被调用? 就像在许多语言中一样,只要对象超出范围,就会调用类析构函数吗? PHP 5 introduces a destructor concept similar to that of other object-oriented languages,such as C++. The destructor method will
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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读