Arquivos
hhvm/hphp/test/quick/eval.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07: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();