View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001324 | Xdebug | Uncategorized | public | 2016-06-30 04:21 | 2016-07-07 10:00 |
Reporter | munkie | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | not fixable | ||
Product Version | 2.4.0 | ||||
Summary | 0001324: Not all line of array of class constants is covered with php7 | ||||
Description | Given array of class constants is assigned to variable Tested against master branch (commit 5744af67332931df80b120b5796cd4425dfef0aa) | ||||
Steps To Reproduce | Run following script, should return OK <?php class Klass xdebug_start_code_coverage(); $map = [ xdebug_stop_code_coverage(false); $expected = [13 => 1, 14 => 1, 15 => 1, 16 => 1, 18 => 1]; | ||||
Tags | No tags attached. | ||||
Operating System | Ubuntu 16.04 LTS | ||||
PHP Version | 7.0.5-7.0.9 | ||||
|
Hi! You're right, it indeed does not show any code on lines 14-17. But unfortunately, I can't do anything about this. In PHP 7, the constant array is converted during parsing to a <array> node in the AST, and the only code that is run, is actually the assignment. If you look at it with VLD, it shows: [code] The ASSIGN on line 13 is the whole assignment. PHP 5 did not have this optimisation, and hence runs code for each line: [code] cheers, |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-06-30 04:21 | munkie | New Issue | |
2016-07-07 09:57 | derick | Note Added: 0003641 | |
2016-07-07 09:57 | derick | Status | new => resolved |
2016-07-07 09:57 | derick | Resolution | open => not fixable |
2016-07-07 09:57 | derick | Assigned To | => derick |
2016-07-07 09:58 | derick | Note Edited: 0003641 | |
2016-07-07 10:00 | derick | Note Edited: 0003641 | |
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 |