3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Main { private $N; public function run() { $this->N = 77777777; $string = ''; for ( $i = $this->N; i --> 0; ) { $string .= ' '; } } public function getTime() { $mtime = microtime(); $mtime = explode( ' ', $mtime ); $mtime = $mtime[1] + $mtime[0]; return $mtime; } } $Main = new Main(); $start = $Main->getTime(); $Main->run(); $end = $Main->getTime(); echo "Method execution took " . ( $end - $start ) . " seconds";
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '--' (T_DEC), expecting ';' in /in/Ws61s on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_DEC, expecting ';' in /in/Ws61s on line 12
Process exited with code 255.