3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php     $START = time();     $foo['bar'] = "test";     for ($i = 0; $i < 10000000; ++$i) {         if ($foo['bar'] == "test") {             $j = 0;         }     }     $END = time() - $START;     echo "Array took $END seconds\n";     $START = time();     $testvar = $foo['bar'];     for ($i = 0; $i < 10000000; ++$i) {         if ($testvar == "test") {             $j = 0;         }     }    $END = time() - $START;    echo "Var took $END seconds\n";
based on mmJie
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.0 - 5.4.31
Parse error: syntax error, unexpected '$START ' (T_VARIABLE) in /in/qvZ07 on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<?php     $START = time();     $foo['bar'] = "test";     for ($i = 0; $i < 10000000; ++$i) {         if ($foo['bar'] == "test") {             $j = 0;         }     }     $END = time() - $START;     echo "Array took $END seconds\n";     $START = time();     $testvar = $foo['bar'];     for ($i = 0; $i < 10000000; ++$i) {         if ($testvar == "test") {             $j = 0;         }     }    $END = time() - $START;    echo "Var took $END seconds\n";