3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php header('Content-Type: text/plain'); //print_r($_SERVER); function on_shutdown(){ echo "<!--\n"; echo "\n\tTime Taken:"; echo "\n\t\t".number_format(microtime(true) - PM_INIT_TIME, 8)."s"; echo "\n\tHeaders Sent:"; $file = $line = null; headers_sent($file, $line); echo "\n\t\t$file: $line"; echo "\n\tLast Error:"; if(function_exists('error_get_last') && error_get_last()) foreach(error_get_last() as $k=>$v) echo "\n\t\t$k: $v"; elseif($php_errormsg) echo "\n\t\tError: $php_errormsg"; else echo "\n\t\tnone"; echo "\n\tIncluded Files:"; echo "\n\t\t".implode("\n\t\t", get_included_files()); echo "\n-->"; } define('PM_INIT_TIME', microtime(true)); register_shutdown_function('on_shutdown'); while(ob_get_level())ob_end_flush(); ob_implicit_flush(true); $a = 100; $b = 3; for($i=0; $i<999999)$c = $a / $b; /*$dir = $_SERVER['SCRIPT_FILENAME']; while($dir = rtrim(dirname($dir), '/')){ echo $dir.PHP_EOL; foreach(glob($dir.'/*') as $file)echo chr(9).$file.PHP_EOL; }*/ ?>
Output for 5.3.0 - 5.4.13
Parse error: syntax error, unexpected ')', expecting ';' in /in/rBOaO on line 32
Process exited with code 255.