<?php

function doSomething($param) {
    echo $param; #4
}                #5

xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
!empty($var) && doSomething($var);  #8
$data = xdebug_get_code_coverage(); #9
xdebug_stop_code_coverage();

print_r($data);

/*
[test.php] => Array
(
    [8] => 1
    [9] => 1
)
*/

xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
$var = 'hello';                     #23
!empty($var) && doSomething($var);  #24
$data = xdebug_get_code_coverage(); #25
xdebug_stop_code_coverage();

print_r($data);

/*
[test.php] => Array
(
    [4] => 1
    [5] => 1
    [23] => 1 
    [24] => 1
    [25] => 1
)
*/

