3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); echo __LINE__; $foo = function() { return 'OK'; // throw new \Exception('foo'); return 'NOT OK'; } $return = $foo(); echo $return; try { $foo = function() { return 'OK'; // throw new \Exception('foo'); return 'NOT OK'; } $return = $foo(); echo $return; } catch (\Exception $e) { var_dump($e); }

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.260.0000.03719.06
5.4.250.0070.03019.16
5.4.240.0070.03018.94
5.4.230.0070.03019.22
5.4.220.0030.03719.16
5.4.210.0000.03718.84
5.4.200.0000.03718.98
5.4.190.0070.03018.84
5.4.180.0000.03718.84
5.4.170.0030.03319.08
5.4.160.0000.04019.11
5.4.150.0030.03319.07
5.4.140.0000.03316.33
5.4.130.0000.03316.49
5.4.120.0000.03316.31
5.4.110.0030.03316.40
5.4.100.0000.03316.46
5.4.90.0030.03316.58
5.4.80.0100.05316.54
5.4.70.0070.07316.24
5.4.60.0070.07016.25
5.4.50.0000.04016.43
5.4.40.0070.05016.34
5.4.30.0030.05716.32
5.4.20.0100.05316.32
5.4.10.0030.05316.24
5.4.00.0070.06715.83
5.3.280.0070.03314.58
5.3.270.0030.03314.59
5.3.260.0170.03314.52
5.3.250.0030.03314.68
5.3.240.0000.03714.61
5.3.230.0000.04014.50
5.3.220.0000.05314.54
5.3.210.0030.03314.58
5.3.200.0030.03314.72
5.3.190.0000.03714.54
5.3.180.0070.04314.55
5.3.170.0030.07014.55
5.3.160.0030.05314.46
5.3.150.0030.05314.72
5.3.140.0000.06014.48
5.3.130.0000.07014.62
5.3.120.0030.04314.52
5.3.110.0070.07014.71
5.3.100.0030.04714.09
5.3.90.0000.06713.93
5.3.80.0030.04713.94
5.3.70.0030.05313.94
5.3.60.0000.07313.98
5.3.50.0030.04313.87
5.3.40.0000.07313.92
5.3.30.0030.07313.99
5.3.20.0030.04313.60
5.3.10.0000.05313.57
5.3.00.0000.07313.79

preferences:
140.72 ms | 1394 KiB | 7 Q