View Issue Details

IDProjectCategoryView StatusLast Update
0001989XdebugProfilingpublic2021-07-30 18:41
Reportertrowbot Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version3.0.4 
Target Version3.1dev 
Summary0001989: Profiling does not output correct class when parent keyword is used
DescriptionIn 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 ReproduceProfile 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

Issue History

Date Modified Username Field Change
2021-06-28 19:59 trowbot New Issue
2021-06-30 11:35 derick Status new => confirmed
2021-06-30 11:35 derick Target Version => 3.1dev
2021-06-30 11:35 derick Note Added: 0005919
2021-07-30 18:41 derick Note Added: 0005950