Arquivos
hhvm/hphp/test/vm/eval.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

31 linhas
440 B
PHP

<?php
function main() {
print "Test begin\n";
$x = "Hello";
$y = "world";
$s = '$x $y!';
for ($i = 0; $i < 2; ++$i) {
eval("\$r = \"$s\";
\$x = \"Goodbye\";");
print "$i: $r\n";
}
function testEval(&$i) {
eval('$i *= 33;');
}
$i = 1;
while ($i < 100000) {
testEval($i);
var_dump($i);
}
for ($i = 0; $i < 5; ++$i) {
eval('print "Hello!\n";');
}
print "Test end\n";
}
main();