<bdo id='rZn9B'></bdo><ul id='rZn9B'></ul>

      <small id='rZn9B'></small><noframes id='rZn9B'>

      <legend id='rZn9B'><style id='rZn9B'><dir id='rZn9B'><q id='rZn9B'></q></dir></style></legend>

        <i id='rZn9B'><tr id='rZn9B'><dt id='rZn9B'><q id='rZn9B'><span id='rZn9B'><b id='rZn9B'><form id='rZn9B'><ins id='rZn9B'></ins><ul id='rZn9B'></ul><sub id='rZn9B'></sub></form><legend id='rZn9B'></legend><bdo id='rZn9B'><pre id='rZn9B'><center id='rZn9B'></center></pre></bdo></b><th id='rZn9B'></th></span></q></dt></tr></i><div id='rZn9B'><tfoot id='rZn9B'></tfoot><dl id='rZn9B'><fieldset id='rZn9B'></fieldset></dl></div>

        <tfoot id='rZn9B'></tfoot>
      1. 我可以信任调用 PHP __destruct() 方法吗?

        时间:2024-08-10
          <tbody id='OVvpc'></tbody>
        <i id='OVvpc'><tr id='OVvpc'><dt id='OVvpc'><q id='OVvpc'><span id='OVvpc'><b id='OVvpc'><form id='OVvpc'><ins id='OVvpc'></ins><ul id='OVvpc'></ul><sub id='OVvpc'></sub></form><legend id='OVvpc'></legend><bdo id='OVvpc'><pre id='OVvpc'><center id='OVvpc'></center></pre></bdo></b><th id='OVvpc'></th></span></q></dt></tr></i><div id='OVvpc'><tfoot id='OVvpc'></tfoot><dl id='OVvpc'><fieldset id='OVvpc'></fieldset></dl></div>
        • <bdo id='OVvpc'></bdo><ul id='OVvpc'></ul>
        • <legend id='OVvpc'><style id='OVvpc'><dir id='OVvpc'><q id='OVvpc'></q></dir></style></legend>
        • <small id='OVvpc'></small><noframes id='OVvpc'>

          <tfoot id='OVvpc'></tfoot>

                  本文介绍了我可以信任调用 PHP __destruct() 方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 PHP5 中,是否保证为每个对象实例调用 __destruct() 方法?程序中的异常可以防止这种情况发生吗?

                  In PHP5, is the __destruct() method guaranteed to be called for each object instance? Can exceptions in the program prevent this from happening?

                  推荐答案

                  当所有引用被释放或脚本终止时,将调用析构函数.我认为这意味着脚本正确终止时.我会说关键异常并不能保证调用析构函数.

                  The destructor will be called when the all references are freed, or when the script terminates. I assume this means when the script terminates properly. I would say that critical exceptions would not guarantee the destructor to be called.

                  PHP 文档 有点薄,但它确实说析构函数中的异常会导致问题.

                  The PHP documentation is a little bit thin, but it does say that Exceptions in the destructor will cause issues.

                  这篇关于我可以信任调用 PHP __destruct() 方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:PHP中有垃圾收集吗? 下一篇:脚本运行时的php垃圾收集

                  相关文章

                  <legend id='eRB7n'><style id='eRB7n'><dir id='eRB7n'><q id='eRB7n'></q></dir></style></legend>

                1. <i id='eRB7n'><tr id='eRB7n'><dt id='eRB7n'><q id='eRB7n'><span id='eRB7n'><b id='eRB7n'><form id='eRB7n'><ins id='eRB7n'></ins><ul id='eRB7n'></ul><sub id='eRB7n'></sub></form><legend id='eRB7n'></legend><bdo id='eRB7n'><pre id='eRB7n'><center id='eRB7n'></center></pre></bdo></b><th id='eRB7n'></th></span></q></dt></tr></i><div id='eRB7n'><tfoot id='eRB7n'></tfoot><dl id='eRB7n'><fieldset id='eRB7n'></fieldset></dl></div>
                  <tfoot id='eRB7n'></tfoot>

                    <small id='eRB7n'></small><noframes id='eRB7n'>

                    • <bdo id='eRB7n'></bdo><ul id='eRB7n'></ul>