Hi all,
I've experienced a few difficulties with the (promising) XDEBUG_CC_UNUSED
parameter in 2.0.0beta2. It concerns the following code:
<?
function a()
{
return NULL;
}
xdebug_start_code_coverage(XDEBUG_CC_UNUSED);
a();
$cc = xdebug_get_code_coverage();
xdebug_stop_code_coverage();
var_dump($cc);
?>
which results in the following output:
array(1) {
["/var/www/experiment/xdebug_cc.php"]=>
array(5) {
[2]=>
int(-1)
[4]=>
int(1)
[5]=>
int(-1)
[8]=>
int(1)
[9]=>
int(1)
}
}
IMHO this output is not entirely correct, as the single statement in a()
is executed, but the stub and end of the function aren't?
I think two solutions are possible:
- don't consider the stub/end of a function to be executable
- implement code to detect the opcodes of the stub/end
Warm regards,
Michiel Rook
Received on Tue Nov 30 2004 - 10:52:46 GMT
This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST