Skip to content

Instantly share code, notes, and snippets.

@cbandy
Created July 1, 2011 06:07
Show Gist options
  • Save cbandy/1057957 to your computer and use it in GitHub Desktop.
Save cbandy/1057957 to your computer and use it in GitHub Desktop.
line 7: zend_isset_isempty_var
<?php
xdebug_start_code_coverage(XDEBUG_CC_UNUSED);
class c { function f() {} function __construct() {
$this->f(
empty($var)
? 1
: 2
);
} }
$c = new c;
print_r(xdebug_get_code_coverage());
@cbandy
Copy link
Author

cbandy commented Jul 1, 2011

Line 7 is not reported as covered.

Seemed to require a method call on the previous line to evoke. Line 8 has jmpz as well as jmp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment