View Issue Details

IDProjectCategoryView StatusLast Update
0001989XdebugProfilingpublic2021-10-04 09:32
Reportertrowbot Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.0.4 
Target Version3.1devFixed in Version3.1.0 
Summary0001989: Profiling does not output correct class when parent keyword is used
Description

In the given test case, class B's constructor calls class A's constructor, however, there is no mention of A->__construct in the cachegrind file. Instead, the cachegrind file makes it look as though class B is calling its constructor recursively.

Steps To Reproduce

Profile the following test case and view the resulting cachegrind file:

<?php

class A
{
public function __construct()
{
}
}

class B extends A
{
public function construct()
{
parent::
construct();
}
}

new B();

TagsNo tags attached.
Operating System
PHP Version7.4.10-7.4.19

Activities

derick

2021-06-30 11:35

administrator   ~0005919

I can reproduce this.

derick

2021-07-30 18:41

administrator   ~0005950

https://github.com/xdebug/xdebug/pull/766