3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_function($param1, $param2) { // do something great } try { my_function('only_one_param'); } catch (AppException $exception) { } class AppException extends Exception { } function error_handler($errno, $errstr, $errfile, $errline) { throw new AppException($errstr, $errno); } function exception_handler($exception) { $min = ...; $max = ...; if ($exception->getCode() >= $min && $exception->getCode() <= $max) { // log exception } } set_error_handler('error_handler'); set_exception_handler('exception_handler'); /* throw new MyException('This is a really bad error', 123); final public ExceptionException::getPrevious ( void ) error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, '00007600', $errno, $errfile, $errline, new Exception('jjj')); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { var_dump($e->getPrevious()); }*/

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.240.0060.04312.39
5.4.230.0060.03812.38
5.4.220.0060.03612.38
5.4.210.0040.03812.38
5.4.200.0070.03712.38
5.4.190.0050.04912.38
5.4.180.0080.03712.38
5.4.170.0040.03712.39
5.4.160.0030.03812.38
5.4.150.0040.03712.38
5.4.140.0050.03712.07
5.4.130.0090.03212.05
5.4.120.0050.03612.02
5.4.110.0050.03512.02
5.4.100.0090.03112.01
5.4.90.0060.04412.01
5.4.80.0090.03812.02
5.4.70.0030.03712.01
5.4.60.0040.03612.00
5.4.50.0080.03412.01
5.4.40.0060.04312.00
5.4.30.0070.04111.99
5.4.20.0040.04211.99
5.4.10.0050.03711.99
5.4.00.0030.03911.48
5.3.280.0070.03812.71
5.3.270.0030.04312.73
5.3.260.0070.04612.72
5.3.250.0050.04212.72
5.3.240.0050.03712.71
5.3.230.0060.03712.71
5.3.220.0070.03512.68
5.3.210.0060.03812.68
5.3.200.0050.04112.68
5.3.190.0030.04412.68
5.3.180.0040.03912.67
5.3.170.0080.03512.67
5.3.160.0060.03612.67
5.3.150.0060.03712.67
5.3.140.0040.03812.66
5.3.130.0030.04212.65
5.3.120.0080.03812.66
5.3.110.0050.04112.66
5.3.100.0040.04112.12
5.3.90.0060.03612.08
5.3.80.0030.03912.08
5.3.70.0070.03812.08
5.3.60.0070.03512.06
5.3.50.0100.03912.00
5.3.40.0050.05212.00
5.3.30.0070.03411.96
5.3.20.0060.03511.74
5.3.10.0060.03511.70
5.3.00.0070.03411.68

preferences:
138.59 ms | 1394 KiB | 7 Q