3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExceptionHandler { public static function printException(Exception $e) { print 'Uncaught '.get_class($e).', code: ' . $e->getCode() . "<br />Message: " . htmlentities($e->getMessage())."\n"; } public static function handleException(Exception $e) { self::printException($e); } } set_exception_handler(array("ExceptionHandler", "handleException")); class NewException extends Exception {} try { throw new NewException("Catch me once", 1); } catch (Exception $e) { ExceptionHandler::handleException($e); } throw new Exception("Catch me twice", 2); ?>

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)
8.3.60.0120.00316.50
8.3.50.0120.00622.92
8.3.40.0120.00318.97
8.3.30.0110.01119.22
8.3.20.0120.00620.09
8.3.10.0060.00320.55
8.3.00.0090.00921.01
8.2.180.0160.00618.30
8.2.170.0000.01322.96
8.2.160.0100.00320.45
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0070.00319.36
8.2.110.0070.00320.34
8.2.100.0040.00817.85
8.2.90.0080.00018.16
8.2.80.0000.00818.05
8.2.70.0030.00517.38
8.2.60.0000.01017.93
8.2.50.0030.00618.07
8.2.40.0030.00618.21
8.2.30.0000.00719.51
8.2.20.0030.00717.73
8.2.10.0000.00818.16
8.2.00.0050.00317.81
8.1.280.0120.00625.92
8.1.270.0050.00322.22
8.1.260.0000.00726.35
8.1.250.0070.01128.09
8.1.240.0090.00022.19
8.1.230.0070.00420.92
8.1.220.0040.00417.74
8.1.210.0080.00519.10
8.1.200.0070.00317.25
8.1.190.0050.00317.41
8.1.180.0080.00418.10
8.1.170.0040.00418.32
8.1.160.0000.00718.81
8.1.150.0000.00818.82
8.1.140.0040.00417.49
8.1.130.0000.00717.88
8.1.120.0040.00317.41
8.1.110.0040.00417.40
8.1.100.0030.00517.53
8.1.90.0040.00417.52
8.1.80.0000.00717.38
8.1.70.0030.00317.48
8.1.60.0090.00017.63
8.1.50.0000.00817.53
8.1.40.0120.00017.38
8.1.30.0000.00817.59
8.1.20.0040.00417.64
8.1.10.0000.00817.63
8.1.00.0030.00617.50
8.0.300.0040.00420.21
8.0.290.0070.00017.18
8.0.280.0000.00718.45
8.0.270.0070.00017.24
8.0.260.0030.00717.25
8.0.250.0030.00317.09
8.0.240.0000.00716.97
8.0.230.0040.00417.00
8.0.220.0030.00316.91
8.0.210.0000.00717.03
8.0.200.0000.00716.94
8.0.190.0000.00816.90
8.0.180.0000.00716.89
8.0.170.0040.00416.91
8.0.160.0040.00417.00
8.0.150.0080.00017.00
8.0.140.0000.00716.82
8.0.130.0000.00713.45
8.0.120.0030.00516.95
8.0.110.0000.00716.87
8.0.100.0050.00316.87
8.0.90.0000.00716.87
8.0.80.0030.01217.01
8.0.70.0040.00416.84
8.0.60.0040.00416.80
8.0.50.0040.00417.08
8.0.30.0050.01417.08
8.0.20.0080.01317.40
8.0.10.0040.00417.10
8.0.00.0160.00316.63
7.4.330.0050.00015.09
7.4.320.0030.00316.62
7.4.300.0060.00016.61
7.4.290.0000.00716.62
7.4.280.0030.00316.46
7.4.270.0000.00816.69
7.4.260.0000.00916.59
7.4.250.0080.00016.59
7.4.240.0030.00416.64
7.4.230.0050.00216.48
7.4.220.0100.00716.54
7.4.210.0070.00716.55
7.4.200.0030.00316.52
7.4.160.0060.01016.52
7.4.150.0100.01017.40
7.4.140.0070.01317.86
7.4.130.0110.00616.61
7.4.120.0080.01116.68
7.4.110.0100.00616.41
7.4.100.0150.00916.70
7.4.90.0090.00916.50
7.4.80.0100.01319.39
7.4.70.0120.00616.35
7.4.60.0090.00616.36
7.4.50.0030.00616.41
7.4.40.0060.01616.70
7.4.30.0120.01216.64
7.4.00.0040.00814.95
7.3.330.0060.00013.28
7.3.320.0000.00513.46
7.3.310.0000.00716.46
7.3.300.0030.00516.37
7.3.290.0100.00516.49
7.3.280.0080.00916.47
7.3.270.0120.00617.40
7.3.260.0150.00616.61
7.3.250.0100.01016.52
7.3.240.0080.00816.66
7.3.230.0030.01316.68
7.3.210.0060.01316.47
7.3.200.0000.01819.39
7.3.190.0120.00616.64
7.3.180.0090.00616.65
7.3.170.0040.01316.37
7.3.160.0060.00916.52
7.2.330.0030.01316.65
7.2.320.0050.01116.45
7.2.310.0100.01316.63
7.2.300.0040.01216.61
7.2.290.0090.00916.67
7.2.00.0100.00619.12
7.1.100.0140.00917.89
7.1.70.0000.00817.23
7.1.60.0030.01019.34
7.1.50.0100.00716.91
7.1.00.0000.08022.36
7.0.200.0100.00316.97
7.0.140.0000.06722.05
7.0.60.0100.05019.98
7.0.50.0000.07017.99
7.0.40.0070.08320.30
7.0.30.0530.03320.11
7.0.20.0200.03720.06
7.0.10.0230.04320.07
7.0.00.0030.04720.18
5.6.280.0070.07020.93
5.6.210.0030.04020.61
5.6.200.0030.07318.22
5.6.190.0030.05020.48
5.6.180.0300.04020.33
5.6.170.0170.04320.64
5.6.160.0070.05720.57
5.6.150.0000.08718.19
5.6.140.0000.05018.26
5.6.130.0070.05318.20
5.6.120.0170.07321.02
5.6.110.0070.04021.00
5.6.100.0000.06021.00
5.6.90.0100.08020.89
5.6.80.0070.08320.49
5.6.70.4400.03320.37
5.5.350.0030.06020.31
5.5.340.0100.07017.96
5.5.330.0030.05020.26
5.5.320.0330.05020.27
5.5.310.0300.07320.31
5.5.300.0130.04718.04
5.5.290.0130.07717.97
5.5.280.0030.05020.81
5.5.270.0100.05320.78
5.5.260.0130.06720.78
5.5.250.0100.08020.73
5.5.240.0070.06320.17
5.4.450.0200.04737.91
5.4.440.0170.04337.91
5.4.430.0270.05037.90
5.4.420.0070.05719.41
5.4.410.0070.05719.09
5.4.400.0130.05318.77
5.4.390.0070.06318.57
5.4.380.0170.06718.79
5.4.370.0100.05318.47
5.4.360.0130.05318.79
5.4.350.0100.03713.79
5.4.340.0130.03013.95
5.4.320.0130.03714.22
5.4.310.0070.04014.27
5.4.300.0000.04314.28
5.4.290.0070.04714.27
5.4.280.0070.03714.11
5.4.270.0100.03314.11
5.4.260.0070.04314.14
5.4.250.0170.03314.16
5.4.240.0130.03714.17
5.4.230.0030.04314.14
5.4.220.0130.03014.39
5.4.210.0170.03014.15
5.4.200.0070.04014.29
5.4.190.0070.04714.16
5.4.180.0130.03714.38
5.4.170.0100.04014.11
5.4.160.0170.02714.27
5.4.150.0070.03714.13
5.4.140.0100.03713.86
5.4.130.0130.03314.06
5.4.120.0070.03713.71
5.4.110.0000.04713.77
5.4.100.0030.04013.77
5.4.90.0030.04013.71
5.4.80.0070.03713.68
5.4.70.0030.03713.75
5.4.60.0130.03013.89
5.4.50.0100.04013.75
5.4.40.0070.03713.75
5.4.30.0030.04013.82
5.4.20.0070.03713.74
5.4.10.0070.03713.76
5.4.00.0030.04013.26
5.3.290.0030.04714.70
5.3.280.0000.04714.75
5.3.270.0100.04014.80
5.3.260.0070.04014.77
5.3.250.0170.03014.66
5.3.240.0030.04314.55
5.3.230.0200.03714.74
5.3.220.0130.05014.56
5.3.210.0130.03714.50
5.3.200.0000.04314.68
5.3.190.0070.04014.51
5.3.180.0100.03714.72
5.3.170.0100.04714.58
5.3.160.0170.03314.56
5.3.150.0100.04314.50
5.3.140.0130.03314.70
5.3.130.0100.04314.54
5.3.120.0100.04014.55
5.3.110.0100.04014.51
5.3.100.0100.03713.98
5.3.90.0130.03014.01
5.3.80.0170.03314.07
5.3.70.0170.04014.09
5.3.60.0100.03714.11
5.3.50.0070.04013.89
5.3.40.0130.04714.12
5.3.30.0130.04014.02
5.3.20.0100.03313.88
5.3.10.0030.04313.64
5.3.00.0030.04313.63
5.2.170.0070.03711.23
5.2.160.0170.03011.11
5.2.150.0100.04011.07
5.2.140.0230.02711.23
5.2.130.0130.02711.27
5.2.120.0000.04711.15
5.2.110.0130.03311.16
5.2.100.0070.03011.11
5.2.90.0130.02311.27
5.2.80.0070.03011.08
5.2.70.0030.03311.07
5.2.60.0100.02710.99
5.2.50.0030.03310.95
5.2.40.0100.02710.98
5.2.30.0030.03310.97
5.2.20.0030.03011.00
5.2.10.0070.03010.85
5.2.00.0030.03310.91
5.1.60.0030.0239.94
5.1.50.0030.03010.06
5.1.40.0000.0309.95
5.1.30.0070.02710.38
5.1.20.0030.03010.45
5.1.10.0100.02010.12
5.1.00.0000.03010.09
5.0.50.0000.0238.73
5.0.40.0000.0238.34
5.0.30.0100.0278.42
5.0.20.0000.0238.35
5.0.10.0000.0238.25
5.0.00.0100.0238.26
4.4.90.0030.0175.83
4.4.80.0030.0135.84
4.4.70.0030.0175.84
4.4.60.0100.0105.94
4.4.50.0070.0175.80
4.4.40.0030.0275.82
4.4.30.0000.0175.84
4.4.20.0070.0135.91
4.4.10.0030.0175.98
4.4.00.0030.0275.86
4.3.110.0030.0175.82
4.3.100.0100.0135.88
4.3.90.0000.0175.77
4.3.80.0070.0235.71
4.3.70.0030.0135.77
4.3.60.0000.0175.79
4.3.50.0030.0175.78
4.3.40.0070.0235.73
4.3.30.0000.0204.50
4.3.20.0000.0174.46
4.3.10.0000.0174.47
4.3.00.0000.02037.90

preferences:
61.02 ms | 401 KiB | 5 Q