View Issue Details

IDProjectCategoryView StatusLast Update
0001429XdebugCode Coveragepublic2017-05-03 12:56
ReporterexussumAssigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.10
Product Version2.5.3 
Target Version2.5.4Fixed in Version2.5.4 
Summary0001429: Coverage missed on null coalesce
DescriptionRun the file below
Steps To Reproduce<?php
xdebug_start_code_coverage();
$c = [
    $a ?? null,
    $b ?? null
];
var_dump(xdebug_get_code_coverage());


Should return 3 lines 4,5 and 7 currently misses libe 5 ($b ?? null)

Changing the line to $b ?? 0 "fixes" the issue. ie the below returns as expected

<?php
xdebug_start_code_coverage();
$c = [
    $a ?? null,
    $b ?? 0
];
var_dump(xdebug_get_code_coverage());
Additional InformationWent back as far as 2.5.0 still happens there
TagsNo tags attached.
Operating System
PHP Version7.0.20-7.0.24

Activities

derick

2017-05-03 12:56

administrator   ~0004335

Fixed in GIT for Xdebug 2.5.4 - thanks for your report!

Issue History

Date Modified Username Field Change
2017-04-26 13:24 exussum New Issue
2017-04-29 17:16 eslam Tag Attached: null
2017-04-29 17:17 eslam Tag Detached: null
2017-05-01 09:07 derick Assigned To => derick
2017-05-01 09:07 derick Status new => assigned
2017-05-01 09:08 derick Target Version => 2.5.4
2017-05-03 12:56 derick Note Added: 0004335
2017-05-03 12:56 derick Status assigned => closed
2017-05-03 12:56 derick Resolution open => fixed
2017-05-03 12:56 derick Fixed in Version => 2.5.4