<?php
echo "Output:\n\n";
xdebug_start_code_coverage();
include 'tests/basic.t';
$cc = xdebug_get_code_coverage();
xdebug_stop_code_coverage();
$clean = array();
$clean[$test] = $cc[$test];
foreach ($clean as $file => $cc) {
echo "<pre>";
$fc = file($file);
$line_nos = array_keys($cc);
foreach ($fc as $ln => $line) {
if (in_array($ln + 1, $line_nos)) {
$bgc = "aaaaaa";
} else {
$bgc = "dddddd";
}
echo "<div style='background-color: #$bgc'>";
echo @sprintf("%3d [%2d]:\t", $ln + 1, $cc[$ln + 1]);
echo htmlspecialchars($line);
echo "</div>";
}
echo "</pre>";
}
?>