View Issue Details

IDProjectCategoryView StatusLast Update
0001669XdebugUsage problems (Wrong Results)public2019-05-21 09:28
ReporterveeAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformWindowsOSWindowsOS Version10
Product Version2.7.2 
Target VersionFixed in Version 
Summary0001669: Cannot log anything if there is class destructor.
DescriptionI have this code.

```
<?php

class SomeClass
{
    protected $name;

    public function __construct($name = null)
    {
        if (!empty($name) && is_scalar($name)) {
            $this->name = $name;
        } else {
            $this->name = 'World';
        }
    }

    public function __destruct()
    {
        $this->name = null;
    }

    public function sayHello($name = null)
    {
        if (!empty($name) && is_scalar($name)) {
            $this->name = $name;
        }

        echo 'Hello ' . $this->name . '
' . PHP_EOL;
    }
}
```
SomeClass.php


```
<?php

require 'SomeClass.php';

$SomeClass = new SomeClass();
$SomeClass->sayHello();

$random = mt_rand(1, 999);
```
index.php


If I run this code on PHP since 5.5 to7.3 (32 bit) with the latest version of Xdebug, anything cannot be log and Webgrind or QCachegrind can only display SomeClass.php with `__destruct()` method.
The index.php file did not appears and `mt_rand()` function also did not appear.
Steps To ReproduceRun the example source code above with PHP 5.5 or newer (7.3).
Open Xdebug log (cachegrind.out.xxxx.xxxxxxxx) with anything such as Webgrind, QCachegrind.
Can't see index.php file running. Nothing else but SomeClass.php with `__destruct()` method.
Additional InformationXdebug 2.7.2
PHP 7.3.2 32 bit
Apache 2.4 32 bit
Windows 10 64 bit
Tagsdestructor
Operating SystemWindows 10 64 bit
PHP Version7.3.2-7.3.4

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-05-21 09:28 vee New Issue
2019-05-21 09:28 vee Tag Attached: destructor