Bug #75422 [NEW]: Incorrect code coverage report

From: Date: Tue, 24 Oct 2017 03:47:33 +0000
Subject: Bug #75422 [NEW]: Incorrect code coverage report
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211905@lists.php.net to get a copy of this message
From: morozov at tut dot by Operating system: Linux PHP version: 7.1.10 Package: phpdbg Bug Type: Bug Bug description:Incorrect code coverage report Description: ------------ During code coverage using PHPDBG, some lines of code are executed but are not reported covered. Test script: --------------- ↪ phpdbg -qrr coverage.php <?php phpdbg_start_oplog(); $a = [ 'foo' => 0, 'bar' => true, ]; switch (true) { case false: echo 'here'; break; } var_dump(phpdbg_get_executable()); Expected result: ---------------- array(1) { '/home/morozov/coverage.php' => array(6) { [3] => int(0) [6] => int(0) [7] => int(0) [10] => int(0) [11] => int(0) [12] => int(0) [13] => int(0) [16] => int(0) } } Actual result: -------------- array(1) { '/home/morozov/coverage.php' => array(6) { [3] => int(0) [6] => int(0) [11] => int(0) [12] => int(0) [13] => int(0) [16] => int(0) } } Lines 7 and 10 are not reported as covered. -- Edit bug report at https://bugs.php.net/bug.php?id=75422&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75422&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75422&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75422&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75422&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75422&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75422&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75422&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75422&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75422&r=support Expected behavior: https://bugs.php.net/fix.php?id=75422&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75422&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75422&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75422&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75422&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75422&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75422&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75422&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75422&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75422&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75422&r=mysqlcfg

« previous php.bugs (#211905) next »