View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001405 | Xdebug | Code Coverage | public | 2017-03-10 12:44 | 2017-03-10 13:16 |
Reporter | exussum | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | not fixable | ||
Platform | Linux | OS | Ubuntu | OS Version | 16.10 |
Product Version | 2.5.1 | ||||
Summary | 0001405: Continue is covered incorrectly | ||||
Description | xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); foreach([1,2] as $value) { $cc = xdebug_get_code_coverage(); the var dump above should be empty as you cant run the continue (if false prevents it being run) Currently you get | ||||
Steps To Reproduce | Run the above script | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Operating System | |||||
PHP Version | 7.1.0-7.1.4 | ||||
|
The copy paste was incorrect, use the file instead! sorry |
|
I can't reproduce this: derick@singlemalt:~ $ cat /tmp/1405.php $cc = xdebug_get_code_coverage(); derick@singlemalt:~ $ php -v derick@singlemalt:~ $ php /tmp/1405.php |
|
PHP 7.0.15-0ubuntu0.16.10.4 (cli) ( NTS ) Is my version if you run the file rather than the code it should have been <?php xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); foreach([1,2] as $value) { $cc = xdebug_get_code_coverage(); Which is in the file |
|
scott@PC147:/tmp$ php -v xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); foreach([1,2] as $value) { $cc = xdebug_get_code_coverage(); To follow a similar flow as yours |
|
OK, I can now reproduce this, but I can not fix it. PHP unfortunately doesn't reset the line numbers for some of the generated code: 6 9 > EXT_STMT The JMP in line 12 (and line 13) is generated for line 7, and not 8. This is something that needs to be fixed in PHP itself: http://bugs.php.net |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-10 12:44 | exussum | New Issue | |
2017-03-10 12:44 | exussum | File Added: broken.php | |
2017-03-10 12:45 | exussum | Note Added: 0004228 | |
2017-03-10 12:50 | derick | Note Added: 0004229 | |
2017-03-10 12:50 | derick | Assigned To | => derick |
2017-03-10 12:50 | derick | Status | new => feedback |
2017-03-10 12:53 | exussum | Note Added: 0004230 | |
2017-03-10 12:53 | exussum | Status | feedback => assigned |
2017-03-10 12:54 | exussum | Note Added: 0004231 | |
2017-03-10 13:16 | derick | Note Added: 0004232 | |
2017-03-10 13:16 | derick | Status | assigned => resolved |
2017-03-10 13:16 | derick | Resolution | open => not fixable |