脚本关闭是什么意思?

What does script shutdown means?

我是 OOP PHP 的新手,正在向 php.net 学习。但是让我困惑的一件事是

The destructor method will be called as soon as there are no other references to a particular object, or in any order during the shutdown sequence.

是什么意思?以下引用的析构函数部分中的脚本关闭是什么意思link?

参考linkhttp://php.net/manual/en/language.oop5.decon.php

当您的脚本结束时,即当它的所有代码都已执行并且 PHP 已到达您的代码的最后一行时,正在执行您的脚本的 PHP 实例将被关闭.这意味着释放所有变量的所有内存分配,关闭所有打开的资源(例如数据库连接),关闭所有剩余的打开文件句柄等等。它正在清理您的脚本创建的任何状态。

您可以将一些代码挂钩到将 运行 在此关闭阶段(或一旦相关对象被丢弃)执行您可能想要执行的任何自定义清理的代码。