3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!class_exists('Error', false)) { // We can't really avoid making this extend Exception in PHP 5. class Error extends Exception { } } if (!class_exists('TypeError', false)) { class TypeError extends Error { } } try { throw new TypeError("Blah"); /* } catch ( TypeError $e ) { die( 'TypeError' );*/ } catch ( Error $e ) { die( 'Error' ); } catch ( Exception $e ) { die( 'Exception' ); }

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.0060.00916.50
8.3.60.0170.00316.63
8.3.50.0170.00522.11
8.3.40.0070.00718.96
8.3.30.0070.00718.87
8.3.20.0050.00320.39
8.3.10.0050.00221.57
8.3.00.0030.00717.59
8.2.190.0070.00716.58
8.2.180.0160.00616.50
8.2.170.0130.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0070.00726.16
8.2.120.0040.00817.63
8.2.110.0070.00422.26
8.2.100.0040.00817.80
8.2.90.0030.00519.27
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0000.01018.03
8.2.50.0030.00618.07
8.2.40.0060.00321.17
8.2.30.0040.00420.54
8.2.20.0080.00017.76
8.2.10.0040.00418.05
8.2.00.0000.00717.92
8.1.280.0070.01125.92
8.1.270.0080.00023.98
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.54
8.1.230.0120.00017.66
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0080.00017.35
8.1.180.0090.00018.10
8.1.170.0000.00818.96
8.1.160.0000.00722.00
8.1.150.0030.00618.80
8.1.140.0040.00419.41
8.1.130.0000.00717.75
8.1.120.0030.00317.46
8.1.110.0040.00417.45
8.1.100.0000.00817.46
8.1.90.0070.00017.46
8.1.80.0030.00617.35
8.1.70.0040.00417.50
8.1.60.0050.00217.45
8.1.50.0040.00417.54
8.1.40.0040.00417.50
8.1.30.0000.00817.54
8.1.20.0040.00417.54
8.1.10.0030.00517.48
8.1.00.0040.00417.46
8.0.300.0090.00018.77
8.0.290.0000.00716.75
8.0.280.0050.00318.44
8.0.270.0000.00717.25
8.0.260.0030.00317.20
8.0.250.0030.00516.91
8.0.240.0050.00216.98
8.0.230.0000.00716.99
8.0.220.0040.00416.97
8.0.210.0030.00316.96
8.0.200.0070.00016.95
8.0.190.0040.00416.98
8.0.180.0040.00417.00
8.0.170.0030.00616.85
8.0.160.0040.00416.94
8.0.150.0040.00416.80
8.0.140.0040.00416.91
8.0.130.0030.00313.36
8.0.120.0000.00816.92
8.0.110.0000.00716.92
8.0.100.0000.00716.84
8.0.90.0070.00016.76
8.0.80.0060.01216.91
8.0.70.0040.00416.73
8.0.60.0000.00717.00
8.0.50.0060.00316.96
8.0.30.0050.01617.06
8.0.20.0130.00517.40
8.0.10.0040.00416.89
8.0.00.0090.01016.81
7.4.330.0060.00015.08
7.4.320.0000.00616.49
7.4.300.0000.00616.54
7.4.290.0070.00016.58
7.4.280.0030.00516.47
7.4.270.0000.00816.39
7.4.260.0050.00216.58
7.4.250.0020.00516.58
7.4.240.0040.00316.45
7.4.230.0030.00316.38
7.4.220.0090.00916.62
7.4.210.0090.00616.67
7.4.200.0040.00416.57
7.4.160.0060.00916.56
7.4.150.0070.01017.40
7.4.140.0080.01217.86
7.4.130.0090.00716.53
7.4.120.0080.00916.42
7.4.110.0070.01016.56
7.4.100.0100.01316.54
7.4.90.0090.00916.48
7.4.80.0100.00719.39
7.4.70.0090.00916.46
7.4.60.0100.00716.42
7.4.50.0000.00816.34
7.4.40.0060.00916.43
7.4.30.0120.00616.40
7.4.00.0050.00914.97
7.3.330.0000.00513.08
7.3.320.0000.00513.08
7.3.310.0070.00016.33
7.3.300.0050.00216.31
7.3.290.0140.00316.25
7.3.280.0070.00816.29
7.3.270.0030.01417.40
7.3.260.0070.01716.42
7.3.250.0100.00716.37
7.3.240.0100.01216.33
7.3.230.0100.00716.40
7.3.210.0130.00316.42
7.3.200.0060.01216.54
7.3.190.0060.01316.40
7.3.180.0090.00616.19
7.3.170.0100.00616.39
7.3.160.0090.00716.48
7.3.120.0070.00714.85
7.3.110.0130.00314.50
7.3.100.0040.01114.79
7.3.90.0000.01414.51
7.3.80.0030.01014.62
7.3.70.0070.00714.82
7.3.60.0040.01114.75
7.3.50.0040.01114.91
7.3.40.0080.00414.58
7.3.30.0100.00314.87
7.3.20.0100.00316.76
7.3.10.0030.01016.64
7.3.00.0030.00816.59
7.2.330.0110.00616.66
7.2.320.0040.01316.74
7.2.310.0090.00816.69
7.2.300.0050.01116.44
7.2.290.0100.00616.75
7.2.250.0090.00915.09
7.2.240.0030.01315.26
7.2.230.0000.01615.14
7.2.220.0090.00615.01
7.2.210.0090.00915.11
7.2.200.0040.01114.97
7.2.190.0030.01014.94
7.2.180.0080.00615.19
7.2.170.0100.00314.85
7.2.60.0060.00616.92
7.1.330.0120.00315.31
7.1.320.0080.00315.57
7.1.310.0000.01515.44
7.1.300.0100.00315.64
7.1.290.0090.00015.75
7.1.280.0050.00515.88
7.1.270.0030.00715.69
7.1.260.0100.00315.78
7.1.200.0060.00315.49
7.1.70.0000.00717.05
7.1.60.0030.02019.11
7.1.50.0060.01616.88
7.1.00.0030.07722.45
7.0.200.0250.01014.69
7.0.100.0170.07719.95
7.0.90.0170.08019.99
7.0.80.0130.07020.04
7.0.70.0130.07719.99
7.0.60.0130.08019.95
7.0.50.0100.08020.26
7.0.40.0100.06719.95
7.0.30.0070.09020.04
7.0.20.0070.08320.13
7.0.10.0070.07020.10
7.0.00.0200.06720.05
5.6.280.0000.07720.86
5.6.250.0170.07720.50
5.6.240.0000.05720.60
5.6.230.0100.07720.56
5.6.220.0000.05720.65
5.6.210.0130.07320.77
5.6.200.0100.05321.02
5.6.190.0000.09021.05
5.6.180.0070.08721.06
5.6.170.0100.07721.12
5.6.160.0070.08721.17
5.6.150.0170.07721.10
5.6.140.0070.08321.13
5.6.130.0200.07720.99
5.6.120.0030.08321.02
5.6.110.0100.07720.93
5.6.100.0100.05321.03
5.6.90.0070.05721.01
5.6.80.0130.06720.34
5.6.70.0100.06720.44
5.6.60.0100.07720.34
5.6.50.0100.07720.50
5.6.40.0130.07720.30
5.6.30.0100.07320.42
5.6.20.0100.07720.37
5.6.10.0030.07720.31
5.6.00.0070.08020.30
5.5.380.0070.08020.45
5.5.370.0200.06720.40
5.5.360.0100.08320.41
5.5.350.0130.07320.36
5.5.340.0200.06720.93
5.5.330.0030.09720.88
5.5.320.0030.08720.77
5.5.310.0030.05320.83
5.5.300.0130.08020.91
5.5.290.0030.06320.93
5.5.280.0100.06720.87
5.5.270.0100.08320.91
5.5.260.0100.08020.91
5.5.250.0200.06020.61
5.5.240.0170.06720.16
5.5.230.0130.07720.19
5.5.220.0070.07320.25
5.5.210.0170.06320.15
5.5.200.0130.06320.25
5.5.190.0000.08020.22
5.5.180.0000.08320.28
5.5.160.0030.08020.24
5.5.150.0000.08020.27
5.5.140.0070.05720.15
5.5.130.0030.08020.25
5.5.120.0100.07719.98
5.5.110.0030.08320.18
5.5.100.0130.07320.17
5.5.90.0130.06720.07
5.5.80.0070.07019.94
5.5.70.0000.08720.13
5.5.60.0130.07320.12
5.5.50.0130.07020.00
5.5.40.0170.06320.02
5.5.30.0100.08020.08
5.5.20.0100.07720.15
5.5.10.0100.07720.00
5.5.00.0070.08020.03
5.4.450.0030.07719.46
5.4.440.0070.08019.54
5.4.430.0000.08319.46
5.4.420.0070.07319.22
5.4.410.0030.08019.38
5.4.400.0100.07318.86
5.4.390.0170.06718.87
5.4.380.0100.07019.04
5.4.370.0200.03318.90
5.4.360.0100.07319.14
5.4.350.0170.06318.88
5.4.340.0170.05719.04
5.4.320.0100.07318.88
5.4.310.0000.08718.88
5.4.300.0200.05719.21
5.4.290.0130.07019.03
5.4.280.0070.05019.03
5.4.270.0070.04019.23
5.4.260.0100.07319.05
5.4.250.0100.07319.23
5.4.240.0070.07319.12
5.4.230.0030.07718.94
5.4.220.0130.06018.84
5.4.210.0070.07019.04
5.4.200.0030.07719.03
5.4.190.0000.08719.03
5.4.180.0100.06019.02
5.4.170.0100.07318.94
5.4.160.0070.07718.88
5.4.150.0070.07319.04
5.4.140.0000.05016.43
5.4.130.0130.04716.43
5.4.120.0070.07016.30
5.4.110.0070.07716.30
5.4.100.0070.04016.47
5.4.90.0130.05016.47
5.4.80.0070.07716.42
5.4.70.0130.05016.50
5.4.60.0100.06716.37
5.4.50.0000.05316.49
5.4.40.0070.06716.50
5.4.30.0100.07016.41
5.4.20.0170.05716.29
5.4.10.0030.08016.41
5.4.00.0070.07315.70

preferences:
66.55 ms | 401 KiB | 5 Q