MantisBT - Xdebug
View Issue Details
0000562XdebugUsage problems (Wrong Results)public2010-04-13 10:552010-04-13 20:18
kore 
 
normalminoralways
closedfixed 
2.1.0RC1 
 
Linux 2.6.32-20-generic 0000029-Ubuntu SMP x86_64 GNU/Linux
5.3.2
0000562: Incorrect coverage information for closure function headers
Closure function headers are flagged as executable, but not covered (in PHPUnit coverage reports), even if they were executed.
Reproducing code, expected line 6 to also be covered:

<?php

xdebug_start_code_coverage();
$mapped = array_map(
    // This line is flagged as executable, but not covered in PHPUnit code coverage reports
    function ( $value )
    {
        return $value;
    },
    array( 23, 42 )
);

var_dump( xdebug_get_code_coverage() );
// array(1) {
// ["test.php"] => array(7) {
// [0 ] => int(1)
// [4 ] => int(1)
// [8 ] => int(1)
// [9 ] => int(1)
// [10] => int(1)
// [11] => int(1)
// [13] => int(1)
// }
// }
No tags attached.
Issue History
2010-04-13 10:55koreNew Issue
2010-04-13 10:55koreOperating System => Linux 2.6.32-20-generic 0000029-Ubuntu SMP x86_64 GNU/Linux
2010-04-13 10:55korePHP Version => 5.3.2
2010-04-13 10:55koreXdebug Version => 2.1.0-dev
2010-04-13 20:18derickNote Added: 0001445
2010-04-13 20:18derickStatusnew => closed
2010-04-13 20:18derickResolutionopen => fixed
2016-07-31 13:36derickCategoryUsage problems => Usage problems (Crashes)
2016-07-31 13:38derickCategoryUsage problems (Crashes) => Usage problems (Wrong Results)

Notes
(0001445)
derick   
2010-04-13 20:18   
Fixed in revision 3259.