Hello Derick,
We are using Xdebug to get the coverage data for our open-source Code
Coverage reporting tool - Spike PHPCoverage. It has worked great so far.
However, I noticed the following issue recently.
I have following test file:
1. $a
2. += time();
3.
4. $b
5. += 2;
For this file, the coverage array returned by Xdebug (2.0.0 beta2) on
Linux Fedora Core 3 with PHP 5.0.3, shows following information.
array (
[2] => 1,
[4] => 1,
)
This shows that lines 2 and 4 are executable and covered. This is kind
of strange. What is the difference between line 1 and line 4, really?
Why is one of them covered and the other is not?
The same question goes for line 2 and 5. I think both should be reported
as 1 (covered).
Is this a known issue? A peculiarity? Or is there an explanation for this?
Thanks,
Nimish
Derick Rethans wrote:
> On Wed, 20 Apr 2005, Nimish Pachapurkar wrote:
>
>
>>Does this mean that there is no plan to actually get the frequency working
>>like it used to in the earlier version?
>
>
> Correct, it's quite impossible to do correctly.
>
>
>>Does -1 mean that the line is executable PHP code line but is not
>>being exercised at all?
>
>
> Yes.
>
>
>>Also, can you explain a little as to why is it very hard to get the frequency
>>of execution right?
>
>
> Because for example you can have multiple statements on a line, this
> would already count for two hits in the frequency table.
>
> regards,
> Derick
>
Received on Fri Jun 17 2005 - 18:47:04 BST
This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST