尝试分析 php 脚本,但析构函数很模糊

发布于 2024-09-27 07:35:23 字数 1160 浏览 4 评论 0原文

我得到以下 php 跟踪,正如您所看到的,其中一个类的构造函数存在巨大的延迟,但我无法确定原因,因为它没有告诉我哪种类型的子类扩展了它。我如何获得有关跟踪的更多信息以确定此信息。

__destruct() 的代码很简单。

  public function __destruct(){
    unset($this->dbObject);
  }




   0.2180    8723832           -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
    0.2180    8720752           -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
    0.2184    8067856           -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2555    8081936         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2556    8065984         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2557    8052888         -> SIT_Authority->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_Authority.php:0
   84.2557    8052960         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2557    8048936         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0

I'm got the following php trace and as u can see there's a huge delay in the constructors for one of the classes but i'm unable to determine why because it doesn't tell me which type of child class extends it. How do i get more information on the trace to determine this information.

The code for the __destruct() is simple.

  public function __destruct(){
    unset($this->dbObject);
  }




   0.2180    8723832           -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
    0.2180    8720752           -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
    0.2184    8067856           -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2555    8081936         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2556    8065984         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2557    8052888         -> SIT_Authority->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_Authority.php:0
   84.2557    8052960         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0
   84.2557    8048936         -> SIT_DB_Base->__destruct() /usr/local/share/sit/sitlib-2.18/SIT_DB_Base.php:0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倥絔 2024-10-04 07:35:23

试试这个:

$classReflection = new ReflectionClass($classObject);
echo $classReflection->getName();

您还可以在下面查看有关反射对象的更多信息:

链接

Try this :

$classReflection = new ReflectionClass($classObject);
echo $classReflection->getName();

You can also check below for more information about the reflection object :

Link

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文