Arquivos
hhvm/hphp/test/vm/coverage.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

50 linhas
608 B
PHP

<?php
function b($s) {
if (strlen($s) == 4) {
return 12;
}
$z = 234;
return 8;
}
function a($b) {
if ($b) {
$x = 'floo';
} else {
$x = 'fleeee';
}
b($x);
}
function f() {
for ($i = 0; $i < 4; ++$i) {
a($i < 3);
$tmp = $i;
$i = $tmp;
}
}
function enable() {
echo "Going to enable\n";
fb_enable_code_coverage();
echo "Enabled\n";
$z = 3;
}
function doenable() {
$y = 2;
enable();
$y += 43;
}
function main() {
echo "About to enable\n";
doenable();
echo "Done enabling\n";
f();
$r = fb_disable_code_coverage();
var_dump($r);
}
main();