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); } } class NewException extends Exception {} try { throw new NewException("Catch me once", 1); } catch (Exception $e) { ExceptionHandler::handleException($e); } set_exception_handler(array("ExceptionHandler", "handleException")); 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.0110.01116.50
8.3.50.0120.00319.71
8.3.40.0170.00318.93
8.3.30.0150.00019.07
8.3.20.0120.00420.16
8.3.10.0080.00020.66
8.3.00.0080.00020.77
8.2.180.0110.00718.35
8.2.170.0090.00622.96
8.2.160.0170.00020.52
8.2.150.0160.00324.18
8.2.140.0030.00524.66
8.2.130.0000.01426.16
8.2.120.0070.00217.50
8.2.110.0070.00419.27
8.2.100.0040.00717.91
8.2.90.0070.00019.13
8.2.80.0040.00418.05
8.2.70.0040.00417.50
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0050.00318.28
8.2.30.0040.00419.47
8.2.20.0040.00517.76
8.2.10.0070.00018.01
8.2.00.0030.00517.69
8.1.280.0140.00025.92
8.1.270.0030.01622.19
8.1.260.0100.00726.35
8.1.250.0150.00428.09
8.1.240.0030.00622.46
8.1.230.0110.00021.10
8.1.220.0030.00518.77
8.1.210.0080.00018.95
8.1.200.0060.00317.36
8.1.190.0080.00017.63
8.1.180.0040.00418.10
8.1.170.0080.00018.70
8.1.160.0000.00718.82
8.1.150.0050.00218.96
8.1.140.0070.00017.50
8.1.130.0000.00717.89
8.1.120.0000.00717.52
8.1.110.0070.00017.42
8.1.100.0000.01017.42
8.1.90.0000.00717.48
8.1.80.0000.00817.31
8.1.70.0020.00517.30
8.1.60.0060.00317.64
8.1.50.0000.00917.58
8.1.40.0070.00417.50
8.1.30.0000.00817.70
8.1.20.0030.00617.67
8.1.10.0030.00617.61
8.1.00.0000.00817.51
8.0.300.0000.00719.91
8.0.290.0030.00617.05
8.0.280.0030.00318.42
8.0.270.0070.00017.18
8.0.260.0040.00717.28
8.0.250.0030.00316.93
8.0.240.0000.00616.93
8.0.230.0000.00717.03
8.0.220.0000.00716.96
8.0.210.0020.00516.86
8.0.200.0090.00016.92
8.0.190.0050.00316.94
8.0.180.0080.00016.95
8.0.170.0050.00216.94
8.0.160.0030.00516.97
8.0.150.0050.00216.94
8.0.140.0040.00416.81
8.0.130.0090.00013.34
8.0.120.0030.00516.84
8.0.110.0050.00316.98
8.0.100.0000.00716.85
8.0.90.0040.00416.85
8.0.80.0030.01416.99
8.0.70.0070.00016.96
8.0.60.0040.00417.09
8.0.50.0000.00716.95
8.0.30.0140.00517.06
8.0.20.0150.00417.40
8.0.10.0040.00417.02
8.0.00.0090.00816.84
7.4.330.0050.00015.03
7.4.320.0000.00716.57
7.4.300.0000.00616.46
7.4.290.0040.00416.41
7.4.280.0040.00416.61
7.4.270.0000.00716.55
7.4.260.0070.00016.61
7.4.250.0040.00416.50
7.4.240.0030.00516.51
7.4.230.0030.00316.53
7.4.220.0070.01116.45
7.4.210.0060.00916.58
7.4.200.0040.00416.45
7.4.160.0030.01316.70
7.4.150.0050.01117.40
7.4.140.0130.00517.86
7.4.130.0100.00816.54
7.4.120.0120.00516.44
7.4.110.0080.01716.55
7.4.100.0100.01316.74
7.4.90.0030.01416.62
7.4.80.0030.01419.39
7.4.70.0110.00516.65
7.4.60.0090.00916.68
7.4.50.0060.00316.50
7.4.40.0110.00616.42
7.4.30.0150.00616.61
7.4.00.0030.01115.00
7.3.330.0000.00613.45
7.3.320.0030.00313.32
7.3.310.0000.00616.30
7.3.300.0070.00016.46
7.3.290.0070.01016.41
7.3.280.0100.00816.47
7.3.270.0030.01417.40
7.3.260.0030.01716.51
7.3.250.0120.00816.59
7.3.240.0130.00316.72
7.3.230.0080.00816.39
7.3.210.0100.01016.43
7.3.200.0190.00319.39
7.3.190.0110.00616.59
7.3.180.0110.00616.66
7.3.170.0060.01216.46
7.3.160.0130.00216.36
7.2.330.0090.00916.80
7.2.320.0100.00716.65
7.2.310.0050.01316.45
7.2.300.0080.00816.70
7.2.290.0140.01016.38
7.2.00.0040.00819.23
7.1.100.0090.00617.74
7.1.70.0050.00317.23
7.1.60.0070.01719.34
7.1.50.0000.01216.88
7.1.00.0130.06322.48
7.0.200.0100.00716.53
7.0.140.0100.06022.16
7.0.60.0130.07019.80
7.0.50.0070.07717.88
7.0.40.0030.04320.13
7.0.30.0130.04720.06
7.0.20.0200.04020.09
7.0.10.0170.08320.19
7.0.00.0030.04020.14
5.6.280.0070.07321.09
5.6.210.0100.05020.76
5.6.200.0170.07718.34
5.6.190.0100.04020.45
5.6.180.0070.04720.43
5.6.170.0230.04020.67
5.6.160.0030.06020.54
5.6.150.0130.07718.18
5.6.140.0070.07318.14
5.6.130.0100.03318.12
5.6.120.0070.08021.13
5.6.110.0130.08021.08
5.6.100.0130.07721.05
5.6.90.0100.03721.11
5.6.80.0130.05320.43
5.6.70.4500.04020.39
5.5.350.0130.07320.38
5.5.340.0130.04317.97
5.5.330.0130.07720.29
5.5.320.0230.06020.27
5.5.310.0300.07020.29
5.5.300.0030.04717.94
5.5.290.0030.05318.04
5.5.280.0030.07720.78
5.5.270.0030.07720.89
5.5.260.0130.05720.88
5.5.250.0130.08020.75
5.5.240.0070.07020.19
5.4.450.0170.04337.91
5.4.440.0470.03737.91
5.4.430.0570.03737.90
5.4.420.0070.06019.52
5.4.410.0200.05018.97
5.4.400.0130.05718.79
5.4.390.0130.05718.51
5.4.380.0130.05718.84
5.4.370.0100.06018.73
5.4.360.0300.05718.81
5.4.350.0030.03713.89
5.4.340.0030.04013.95
5.4.320.0070.04014.21
5.4.310.0170.03014.27
5.4.300.0030.04014.50
5.4.290.0130.04014.34
5.4.280.0000.04714.28
5.4.270.0070.04014.32
5.4.260.0170.03314.11
5.4.250.0030.04314.19
5.4.240.0030.04314.31
5.4.230.0170.03714.31
5.4.220.0030.04714.38
5.4.210.0070.03714.27
5.4.200.0030.04314.18
5.4.190.0030.04314.15
5.4.180.0130.04314.15
5.4.170.0030.04714.14
5.4.160.0100.03714.09
5.4.150.0100.03714.09
5.4.140.0070.03713.85
5.4.130.0000.04313.77
5.4.120.0100.03714.02
5.4.110.0130.03313.71
5.4.100.0070.04013.76
5.4.90.0070.04313.84
5.4.80.0030.04013.72
5.4.70.0130.03314.01
5.4.60.0170.04313.75
5.4.50.0100.04313.72
5.4.40.0230.03713.77
5.4.30.0100.03713.69
5.4.20.0030.04713.74
5.4.10.0130.03013.88
5.4.00.0030.04013.23
5.3.290.0130.03714.81
5.3.280.0100.03714.57
5.3.270.0030.04714.58
5.3.260.0070.04714.80
5.3.250.0000.04714.75
5.3.240.0030.04314.66
5.3.230.0100.03714.64
5.3.220.0000.05014.64
5.3.210.0030.04714.61
5.3.200.0030.04014.74
5.3.190.0070.03714.61
5.3.180.0030.04014.57
5.3.170.0170.03714.73
5.3.160.0070.04014.53
5.3.150.0070.04014.57
5.3.140.0100.04014.48
5.3.130.0070.04714.54
5.3.120.0030.05014.63
5.3.110.0070.04314.49
5.3.100.0130.04314.01
5.3.90.0170.03014.18
5.3.80.0030.04314.09
5.3.70.0070.04714.00
5.3.60.0200.02714.11
5.3.50.0100.05014.12
5.3.40.0170.03314.04
5.3.30.0030.04313.84
5.3.20.0100.03713.69
5.3.10.0170.02713.82
5.3.00.0070.04313.71
5.2.170.0030.04311.14
5.2.160.0030.03011.20
5.2.150.0100.03311.21
5.2.140.0000.03711.07
5.2.130.0030.03711.26
5.2.120.0100.03011.18
5.2.110.0030.03711.27
5.2.100.0100.03011.13
5.2.90.0100.04011.18
5.2.80.0030.04011.09
5.2.70.0000.03711.13
5.2.60.0070.03710.99
5.2.50.0170.03711.01
5.2.40.0000.04711.07
5.2.30.0070.03710.90
5.2.20.0100.02710.95
5.2.10.0130.02010.82
5.2.00.0100.02710.89
5.1.60.0000.03010.15
5.1.50.0070.0279.96
5.1.40.0130.02710.05
5.1.30.0130.03010.52
5.1.20.0070.03010.28
5.1.10.0100.02010.14
5.1.00.0070.02310.26
5.0.50.0100.0208.64
5.0.40.0030.0238.38
5.0.30.0030.0338.16
5.0.20.0070.0208.26
5.0.10.0030.0308.11
5.0.00.0100.0308.15
4.4.90.0030.0205.84
4.4.80.0070.0205.81
4.4.70.0100.0175.80
4.4.60.0030.0175.84
4.4.50.0070.0175.86
4.4.40.0100.0235.85
4.4.30.0000.0205.91
4.4.20.0030.0175.96
4.4.10.0030.0205.91
4.4.00.0000.0305.94
4.3.110.0100.0135.83
4.3.100.0000.0205.77
4.3.90.0100.0105.80
4.3.80.0070.0235.74
4.3.70.0000.0205.75
4.3.60.0070.0135.72
4.3.50.0070.0135.70
4.3.40.0070.0205.69
4.3.30.0000.0234.58
4.3.20.0000.0204.64
4.3.10.0030.0174.55
4.3.00.0030.01737.90

preferences:
55.18 ms | 400 KiB | 5 Q