3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Exception_Foo extends Exception {} class Exception_Bar extends Exception {} function foo() { throw new Exception_Foo('thing happened'); } function bar() { try { foo(); } catch (Exception_Foo $e) { throw new Exception_Bar("Exception_Foo caught: " . $e->getMessage()); } } function baz() { try { bar(); } catch (Exception_Bar $e) { print_r($e); } } baz();

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.70.0040.01116.47
8.3.60.0170.00318.68
8.3.50.0100.00822.05
8.3.40.0140.00319.02
8.3.30.0030.01219.04
8.3.20.0000.00720.34
8.3.10.0050.00321.97
8.3.00.0000.00720.59
8.2.180.0090.00616.63
8.2.170.0070.00722.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00519.38
8.2.110.0000.00822.25
8.2.100.0060.00619.64
8.2.90.0050.00319.18
8.2.80.0060.00318.03
8.2.70.0050.00317.63
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0050.00218.22
8.2.30.0030.00617.92
8.2.20.0020.00517.66
8.2.10.0000.00717.63
8.2.00.0030.00517.67
8.1.280.0040.01325.92
8.1.270.0060.00322.14
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0040.00423.92
8.1.230.0110.00019.12
8.1.220.0050.00317.77
8.1.210.0030.00618.77
8.1.200.0070.00317.35
8.1.190.0040.00417.52
8.1.180.0060.00318.10
8.1.170.0040.00418.46
8.1.160.0030.00522.00
8.1.150.0080.00018.64
8.1.140.0000.00717.41
8.1.130.0030.00317.83
8.1.120.0000.00817.53
8.1.110.0030.00417.31
8.1.100.0070.00017.41
8.1.90.0070.00017.41
8.1.80.0000.00717.50
8.1.70.0000.00717.36
8.1.60.0040.00417.57
8.1.50.0060.00317.44
8.1.40.0030.00517.52
8.1.30.0060.00317.52
8.1.20.0040.00417.65
8.1.10.0020.00517.58
8.1.00.0070.00017.54
8.0.300.0070.00018.77
8.0.290.0000.00717.05
8.0.280.0000.00718.50
8.0.270.0030.00517.17
8.0.260.0060.00016.89
8.0.250.0030.00317.02
8.0.240.0000.00717.03
8.0.230.0040.00417.09
8.0.220.0030.00316.96
8.0.210.0070.00016.99
8.0.200.0060.00316.94
8.0.190.0000.00717.04
8.0.180.0000.00816.96
8.0.170.0000.00816.89
8.0.160.0040.00417.02
8.0.150.0040.00416.92
8.0.140.0000.00716.87
8.0.130.0000.00513.43
8.0.120.0070.00016.90
8.0.110.0040.00416.88
8.0.100.0000.00716.78
8.0.90.0000.00716.85
8.0.80.0050.01016.96
8.0.70.0060.00317.07
8.0.60.0040.00416.99
8.0.50.0000.00816.95
8.0.30.0080.01117.16
8.0.20.0120.00817.40
8.0.10.0040.00417.04
8.0.00.0130.00816.74
7.4.330.0000.00515.02
7.4.320.0000.00616.41
7.4.300.0060.00016.42
7.4.290.0030.00316.59
7.4.280.0030.00316.42
7.4.270.0000.00716.57
7.4.260.0000.00716.51
7.4.250.0040.00416.52
7.4.240.0020.00516.49
7.4.230.0030.00316.58
7.4.220.0180.00016.54
7.4.210.0050.01016.54
7.4.200.0030.00316.49
7.4.190.0000.00816.55
7.4.160.0140.00316.48
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0100.00916.48
7.4.120.0090.01016.56
7.4.110.0030.01316.33
7.4.100.0070.00916.43
7.4.90.0140.00416.57
7.4.80.0070.01719.39
7.4.70.0120.00416.30
7.4.60.0110.01116.52
7.4.50.0000.00416.28
7.4.40.0070.00522.77
7.4.30.0060.00916.46
7.4.00.0060.01114.83
7.3.330.0060.00013.38
7.3.320.0000.00513.11
7.3.310.0040.00416.16
7.3.300.0070.00016.30
7.3.290.0080.00816.36
7.3.280.0090.01016.30
7.3.270.0100.00717.40
7.3.260.0070.01116.55
7.3.250.0130.00516.47
7.3.240.0080.00816.53
7.3.230.0030.01416.61
7.3.210.0100.00716.54
7.3.200.0090.00619.39
7.3.190.0060.01116.53
7.3.180.0120.00316.42
7.3.170.0110.00516.53
7.3.160.0140.00016.38
7.3.120.0040.01314.68
7.3.110.0080.01214.80
7.3.100.0080.00814.83
7.3.90.0060.00614.67
7.3.80.0020.01214.92
7.3.70.0070.00514.56
7.3.60.0100.00514.77
7.3.50.0060.00914.65
7.3.40.0110.00414.90
7.3.30.0060.00714.63
7.3.20.0060.00916.42
7.3.10.0060.01016.66
7.3.00.0120.00516.63
7.2.330.0100.00716.76
7.2.320.0110.01116.63
7.2.310.0160.00716.54
7.2.300.0100.00716.49
7.2.290.0070.01016.57
7.2.250.0060.01315.00
7.2.240.0070.01114.98
7.2.230.0000.01714.82
7.2.220.0090.00514.83
7.2.210.0050.01015.04
7.2.200.0020.01414.91
7.2.190.0020.01014.94
7.2.180.0050.00914.93
7.2.170.0060.00914.83
7.2.00.0030.01219.33
7.1.330.0090.00615.66
7.1.320.0030.01115.78
7.1.310.0050.01015.94
7.1.300.0030.01015.47
7.1.290.0040.01115.89
7.1.280.0040.01215.75
7.1.270.0030.00815.74
7.1.260.0040.00915.69
7.1.100.0200.01716.94
7.1.70.0030.00917.03
7.1.60.0000.02319.82
7.1.50.0140.00734.70
7.1.00.0000.07722.27
7.0.200.0000.00716.73
7.0.140.0000.07722.02
7.0.60.0230.07719.88
7.0.50.0000.04317.89
7.0.40.0130.04020.30
7.0.30.0270.08020.19
7.0.20.0330.05720.30
7.0.10.0000.07020.22
7.0.00.0030.06020.05
5.6.280.0000.07720.92
5.6.210.0070.08320.48
5.6.200.0070.05318.15
5.6.190.0030.09020.63
5.6.180.0230.08720.54
5.6.170.0230.07320.51
5.6.160.0100.04320.52
5.6.150.0100.03718.13
5.6.140.0100.07318.17
5.6.130.0130.07718.18
5.6.120.0030.04021.14
5.6.110.0070.05721.00
5.6.100.0130.07721.00
5.6.90.0100.08721.15
5.6.80.0070.07320.43
5.5.350.0270.07320.54
5.5.340.0000.05017.96
5.5.330.0100.06320.27
5.5.320.0430.07020.27
5.5.310.0300.05720.27
5.5.300.0070.06317.94
5.5.290.0000.05017.96
5.5.280.0170.07720.98
5.5.270.0130.06720.86
5.5.260.0130.07020.90
5.5.250.0170.07320.52
5.5.240.0200.06720.39
5.4.450.0270.07319.27
5.4.440.0170.06719.40
5.4.430.0270.06319.20
5.4.420.0170.04319.48
5.4.410.0270.06719.38
5.4.400.0300.06319.19
5.4.390.0230.07019.20
5.4.380.0230.04719.28
5.4.370.0200.07018.96
5.4.360.0230.05318.85
5.4.350.0130.04318.87
5.4.340.0270.04318.94
5.4.320.0200.07319.18
5.4.310.0200.07719.23
5.4.300.0300.04718.98
5.4.290.0230.07318.84
5.4.280.0200.07319.15
5.4.270.0330.06318.97
5.4.260.0370.06319.08
5.4.250.0270.05318.98
5.4.240.0330.05719.14
5.4.230.0170.04019.18
5.4.220.0330.04319.09
5.4.210.0200.07319.14
5.4.200.0400.05718.98
5.4.190.0230.05019.22
5.4.180.0270.06718.98
5.4.170.0330.06718.86
5.4.160.0230.08018.86
5.4.150.0230.07719.26
5.4.140.0200.04016.42
5.4.130.0230.03716.46
5.4.120.0200.03316.36
5.4.110.0300.04316.61
5.4.100.0170.07716.60
5.4.90.0270.04016.42
5.4.80.0330.05016.62
5.4.70.0230.03316.39
5.4.60.0330.05316.43
5.4.50.0270.02716.55
5.4.40.0200.03016.43
5.4.30.0230.03016.53
5.4.20.0100.04016.42
5.4.10.0100.04016.52
5.4.00.0130.03315.76
5.3.290.0300.07014.90
5.3.280.0300.06714.59
5.3.270.0230.06714.60
5.3.260.0170.06014.53
5.3.250.0200.04714.60
5.3.240.0270.07014.74
5.3.230.0230.05014.66
5.3.220.0130.04014.58
5.3.210.0300.05314.59
5.3.200.0230.04714.67
5.3.190.0230.03714.50
5.3.180.0230.07314.57
5.3.170.0270.06714.58
5.3.160.0170.05014.50
5.3.150.0270.02714.66
5.3.140.0200.03314.69
5.3.130.0170.03714.64
5.3.120.0070.04714.57
5.3.110.0170.03714.69
5.3.100.0130.03713.97
5.3.90.0130.03714.09
5.3.80.0170.03313.95
5.3.70.0170.03314.09
5.3.60.0230.02713.95
5.3.50.0030.05314.02
5.3.40.0170.04014.06
5.3.30.0130.03713.84
5.3.20.0130.03713.77
5.3.10.0230.02713.58
5.3.00.0230.03013.57
5.2.170.0130.02711.17
5.2.160.0070.03311.39
5.2.150.0030.03711.17
5.2.140.0070.03311.17
5.2.130.0170.02311.13
5.2.120.0100.03011.24
5.2.110.0170.02311.23
5.2.100.0130.02711.28
5.2.90.0170.02311.20
5.2.80.0200.03011.02
5.2.70.0130.02711.23
5.2.60.0170.03310.98
5.2.50.0200.02710.94
5.2.40.0100.03010.95
5.2.30.0070.03010.91
5.2.20.0130.02311.06
5.2.10.0100.03710.84
5.2.00.0030.05710.89
5.1.60.0100.0239.95
5.1.50.0230.02310.11
5.1.40.0130.0209.92
5.1.30.0030.02310.51
5.1.20.0070.02010.27
5.1.10.0030.03010.07
5.1.00.0270.0309.97
5.0.50.0030.0238.57
5.0.40.0070.0178.68
5.0.30.0100.0678.37
5.0.20.0070.0338.20
5.0.10.0030.0308.06
5.0.00.0030.0508.11
4.4.90.0000.0207.84
4.4.80.0070.0137.84
4.4.70.0170.0077.84
4.4.60.0030.0177.84
4.4.50.0070.0137.84
4.4.40.0070.0237.84
4.4.30.0070.0137.84
4.4.20.0030.0137.84
4.4.10.0030.0207.84
4.4.00.0030.0277.84
4.3.110.0030.0207.84
4.3.100.0070.0207.84
4.3.90.0070.0177.84
4.3.80.0030.0337.84
4.3.70.0070.0307.84
4.3.60.0130.0337.84
4.3.50.0170.0177.84
4.3.40.0070.0307.84
4.3.30.0000.0207.84
4.3.20.0030.0177.84
4.3.10.0070.0277.84
4.3.00.0000.0307.84

preferences:
38.29 ms | 401 KiB | 5 Q