View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000872 | Xdebug | Uncategorized | public | 2012-08-07 14:50 | 2016-11-28 23:35 |
| Reporter | sebastian | Assigned To | |||
| Priority | urgent | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | no change required | ||
| Platform | Irrelevant | OS | Irrelevant | OS Version | Irrelevant |
| Product Version | 2.2dev | ||||
| Summary | 0000872: xdebug_get_code_coverage() returns bogus array elements | ||||
| Description | While looking at various open issues for PHP_CodeCoverage today, I noticed that for some files xdebug_get_code_coverage() returns bogus array elements: elements for lines that do not exist in a covered file. These lines are 0 and N+1 where N is the last line of the file. This is the array I get for https://github.com/thePHPcc/bankaccount/blob/master/src/controller/BankAccount.php array(17) { As you can see in the file, lines 0 and 45 do not exist. | ||||
| Additional Information | I am using PHP 5.4.5-dev and Xdebug v2.3.0dev. | ||||
| Tags | No tags attached. | ||||
| Operating System | Irrelevant | ||||
| PHP Version | 5.1.0 | ||||
|
|
VLD shows that PHP thinks line 45 has some code: 44 9 ZEND_VERIFY_ABSTRACT_CLASS $0 Trying to find the 0 now... |
|
|
i suggest checking what token_get_all() returns about line 45 (if anything) (btw, at least atm, the link to sample file is 404) |
|
|
I have not found the 0 yet, but now the example script is gone... suspending for now. |
|
|
I am seeing the issue with line number 0 in my https://github.com/sebastianbergmann/money for the src/Money.php file. However, outside of PHPUnit and this specific test suite I cannot provide a short reproducing script other than the following: <?php use SebastianBergmann\Money\Money; xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); This prints, among data for the other files loaded, the following: '/home/sb/test.php' => |
|
|
Is this specific code coverage related issue still cause a problem for you? |
|
|
No. |
|
|
Okay - let me close this then. |