View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000757 | Xdebug | Uncategorized | public | 2011-12-02 02:54 | 2012-02-29 13:12 |
Reporter | gnombat | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | not fixable | ||
Summary | 0000757: XDEBUG_CC_UNUSED does not work with code outside a function | ||||
Description | For PHP code outside any function, XDEBUG_CC_UNUSED does not seem to work. | ||||
Steps To Reproduce | See the contents of the attached file. If you run code-coverage-inside-function.php, it reports the line "$y = 3;" as uncovered. If you run code-coverage-outside-function.php, it does not have any information for the "$y = 3;" line. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Operating System | Windows, Linux | ||||
PHP Version | 5.3.8 | ||||
|
This is "expected" behaviour. The dead code analysis can only run for new functions that are being created after start_code_coverage() has been run. I can't see a way on how to fix this. The best way would be to start/stop the coverage before you include a file, which is what I do in most of the Xdebug tests. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-12-02 02:54 | gnombat | New Issue | |
2011-12-02 02:54 | gnombat | File Added: code-coverage.zip | |
2012-02-29 13:12 | derick | Note Added: 0001933 | |
2012-02-29 13:12 | derick | Status | new => resolved |
2012-02-29 13:12 | derick | Resolution | open => not fixable |
2012-02-29 13:12 | derick | Assigned To | => derick |
2016-07-31 12:36 | derick | Category | Usage problems => Usage problems (Crashes) |
2016-07-31 12:38 | derick | Category | Usage problems (Crashes) => Usage problems (Wrong Results) |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |