global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / eval.php
blobe2bc13ea2639b4bf35e229ddd86b1beb48f90742
1 <?hh
3 function main() {
4 print "Test begin\n";
6 $x = "Hello";
7 $y = "world";
8 $s = '$x $y!';
9 for ($i = 0; $i < 2; ++$i) {
10 eval("\$r = \"$s\";
11 \$x = \"Goodbye\";");
12 print "$i: $r\n";
15 $testEval = function (&$i) {
16 eval('$i *= 33;');
18 $i = 1;
19 while ($i < 100000) {
20 $testEval(&$i);
21 var_dump($i);
24 for ($i = 0; $i < 5; ++$i) {
25 eval('print "Hello!\n";');
28 print "Test end\n";
30 main();