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.60.0110.00716.75
8.3.50.0120.01021.98
8.3.40.0120.00318.58
8.3.30.0040.01218.50
8.3.20.0040.00420.35
8.3.10.0070.00021.73
8.3.00.0060.00317.60
8.2.180.0110.01116.63
8.2.170.0170.00322.96
8.2.160.0030.01020.57
8.2.150.0030.00624.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00417.75
8.2.110.0040.00721.25
8.2.100.0110.00018.03
8.2.90.0000.01017.84
8.2.80.0050.00218.16
8.2.70.0040.00417.93
8.2.60.0040.00717.91
8.2.50.0040.00818.10
8.2.40.0040.00420.68
8.2.30.0040.00420.62
8.2.20.0040.00417.68
8.2.10.0060.00317.93
8.2.00.0000.00918.05
8.1.280.0120.00625.92
8.1.270.0040.00423.65
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00624.02
8.1.230.0070.00720.90
8.1.220.0030.00617.75
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0090.00017.22
8.1.180.0040.00418.10
8.1.170.0050.00318.65
8.1.160.0050.00322.15
8.1.150.0080.00018.90
8.1.140.0000.00819.52
8.1.130.0030.00317.62
8.1.120.0040.00417.43
8.1.110.0030.00617.41
8.1.100.0000.00717.37
8.1.90.0000.00717.43
8.1.80.0040.00417.34
8.1.70.0000.00717.48
8.1.60.0000.00717.48
8.1.50.0000.00817.44
8.1.40.0040.00417.47
8.1.30.0000.00917.61
8.1.20.0040.00417.56
8.1.10.0040.00417.47
8.1.00.0060.00317.44
8.0.300.0030.00520.03
8.0.290.0000.00916.88
8.0.280.0030.00518.36
8.0.270.0030.00317.20
8.0.260.0030.00317.26
8.0.250.0070.00017.02
8.0.240.0030.00617.00
8.0.230.0040.00417.01
8.0.220.0050.00316.94
8.0.210.0080.00016.84
8.0.200.0000.00616.94
8.0.190.0000.00717.07
8.0.180.0040.00416.96
8.0.170.0090.00016.84
8.0.160.0070.00016.99
8.0.150.0040.00416.86
8.0.140.0040.00416.95
8.0.130.0060.00013.37
8.0.120.0040.00416.89
8.0.110.0000.00816.80
8.0.100.0000.00816.99
8.0.90.0030.00516.89
8.0.80.0060.01016.97
8.0.70.0000.00716.84
8.0.60.0000.00717.07
8.0.50.0030.00616.86
8.0.30.0100.00717.25
8.0.20.0110.00917.40
8.0.10.0020.00517.13
8.0.00.0080.01116.72
7.4.330.0000.00515.08
7.4.320.0000.00616.51
7.4.300.0070.00016.51
7.4.290.0000.00716.57
7.4.280.0040.00416.59
7.4.270.0000.00716.48
7.4.260.0050.00216.58
7.4.250.0040.00416.46
7.4.240.0040.00316.45
7.4.230.0030.00316.38
7.4.220.0140.00416.58
7.4.210.0060.01016.51
7.4.200.0030.00616.53
7.4.160.0080.00816.48
7.4.150.0120.00617.40
7.4.140.0120.00717.86
7.4.130.0150.02016.64
7.4.120.0080.00816.66
7.4.110.0140.00316.69
7.4.100.0060.01216.54
7.4.90.0110.00716.63
7.4.80.0130.00319.39
7.4.70.0060.01116.74
7.4.60.0080.00816.54
7.4.50.0030.00616.43
7.4.40.0040.01116.46
7.4.30.0160.00416.41
7.4.10.0030.01315.16
7.4.00.0050.01114.83
7.3.330.0000.00513.29
7.3.320.0000.00513.37
7.3.310.0000.00716.23
7.3.300.0070.00016.30
7.3.290.0100.00816.26
7.3.280.0090.00916.32
7.3.270.0100.01017.40
7.3.260.0210.00416.58
7.3.250.0100.00816.37
7.3.240.0110.00816.34
7.3.230.0150.00316.39
7.3.210.0130.00316.26
7.3.200.0070.01116.55
7.3.190.0190.03216.38
7.3.180.0100.00616.43
7.3.170.0060.01216.27
7.3.160.0060.00916.32
7.3.130.0110.00814.74
7.3.120.0100.00714.54
7.3.110.0030.01214.93
7.3.100.0070.00714.86
7.3.90.0070.00714.87
7.3.80.0100.00914.84
7.3.70.0000.01714.51
7.3.60.0000.01614.65
7.3.50.0000.01214.60
7.3.40.0090.00014.84
7.3.30.0060.00914.87
7.3.20.0070.00616.57
7.3.10.0110.00316.64
7.3.00.0030.01216.77
7.2.330.0060.01216.74
7.2.320.0100.00716.66
7.2.310.0070.01416.33
7.2.300.0090.00616.66
7.2.290.0140.00316.50
7.2.260.0060.01215.13
7.2.250.0070.00714.87
7.2.240.0030.01014.92
7.2.230.0000.00914.86
7.2.220.0060.00914.95
7.2.210.0040.00714.79
7.2.200.0080.00615.03
7.2.190.0030.01014.88
7.2.180.0030.01414.89
7.2.170.0070.00715.04
7.2.160.0070.00714.96
7.2.150.0060.01016.89
7.2.140.0080.00616.97
7.2.130.0040.01116.61
7.2.120.0000.01416.88
7.2.110.0090.00916.89
7.2.100.0060.00916.80
7.2.90.0060.01316.71
7.2.80.0070.00716.75
7.2.70.0070.01116.86
7.2.60.0050.01116.88
7.2.50.0080.00417.03
7.2.40.0070.00716.89
7.2.30.0040.00716.98
7.2.20.0070.00716.95
7.2.10.0000.01816.91
7.2.00.0050.00618.07
7.1.330.0070.00715.48
7.1.320.0090.00915.79
7.1.310.0070.00715.83
7.1.300.0060.00315.67
7.1.290.0070.00715.65
7.1.280.0090.00615.61
7.1.270.0030.01015.49
7.1.260.0040.00715.86
7.1.250.0110.00415.79
7.1.240.0070.01115.81
7.1.230.0060.00615.77
7.1.220.0000.01215.79
7.1.210.0090.00915.71
7.1.200.0080.00715.67
7.1.190.0000.01515.75
7.1.180.0070.01015.62
7.1.170.0070.00715.74
7.1.160.0060.00615.62
7.1.150.0030.00615.65
7.1.140.0090.00615.87
7.1.130.0030.01015.74
7.1.120.0040.01115.80
7.1.110.0030.00615.86
7.1.100.0060.00816.75
7.1.90.0040.00415.71
7.1.80.0030.01215.73
7.1.70.0040.00516.46
7.1.60.0050.01117.53
7.1.50.0070.01016.42
7.1.40.0100.00715.36
7.1.30.0120.00015.47
7.1.20.0030.00715.56
7.1.10.0000.00915.89
7.1.00.0030.04119.14
7.0.330.0070.01015.06
7.0.320.0030.01315.56
7.0.310.0120.00615.42
7.0.300.0090.00015.56
7.0.290.0120.00315.25
7.0.280.0040.00415.35
7.0.270.0000.01015.39
7.0.260.0060.00615.40
7.0.250.0000.01615.48
7.0.240.0070.00715.43
7.0.230.0050.00515.38
7.0.220.0080.00415.48
7.0.210.0030.01115.07
7.0.200.0120.01115.03
7.0.190.0030.00615.34
7.0.180.0040.00715.36
7.0.170.0000.01115.28
7.0.160.0100.00315.13
7.0.150.0060.00915.62
7.0.140.0030.00715.37
7.0.130.0040.00415.49
7.0.120.0060.00615.22
7.0.110.0040.01215.51
7.0.100.0030.00615.56
7.0.90.0030.00615.30
7.0.80.0040.00815.32
7.0.70.0070.00715.35
7.0.60.0100.03917.64
7.0.50.0100.03816.72
7.0.40.0050.03916.90
7.0.30.0150.02716.81
7.0.20.0260.04216.77
7.0.10.0180.04616.77
7.0.00.0100.02016.88
5.6.400.0030.01014.35
5.6.390.0090.00914.43
5.6.380.0070.00314.19
5.6.370.0090.00314.35
5.6.360.0040.00714.41
5.6.350.0040.01113.98
5.6.340.0060.00314.35
5.6.330.0030.01314.54
5.6.320.0100.00014.56
5.6.310.0030.01014.66
5.6.300.0000.00914.48
5.6.290.0000.01114.09
5.6.280.0020.04217.68
5.6.270.0090.00614.07
5.6.260.0030.01014.44
5.6.250.0040.01114.25
5.6.240.0000.01114.52
5.6.230.0000.01314.17
5.6.220.0030.00614.24
5.6.210.0050.02417.46
5.6.200.0030.04516.13
5.6.190.0070.04717.37
5.6.180.0170.03717.29
5.6.170.0180.04217.42
5.6.160.0090.04317.30
5.6.150.0070.03916.18
5.6.140.0070.02216.31
5.6.130.0080.03716.26
5.6.120.0080.04517.55
5.6.110.0050.04817.76
5.6.100.0100.03017.55
5.6.90.0070.04217.57
5.6.80.0130.04017.24
5.6.70.0210.03117.18
5.6.60.0070.00414.25
5.6.50.0100.00314.23
5.6.40.0040.01214.33
5.6.30.0000.01314.01
5.6.20.0050.00514.23
5.6.10.0000.01314.36
5.6.00.0060.00914.01
5.5.380.0070.00414.00
5.5.370.0080.00714.14
5.5.360.0040.00814.45
5.5.350.0060.04317.49
5.5.340.0030.02416.03
5.5.330.0070.02017.21
5.5.320.0170.03617.08
5.5.310.0180.02117.45
5.5.300.0050.02616.05
5.5.290.0050.03716.04
5.5.280.0050.04417.46
5.5.270.0050.02617.41
5.5.260.0060.03317.41
5.5.250.0050.02417.39
5.5.240.0030.04517.26
5.5.230.0140.00014.32
5.5.220.0000.01114.26
5.5.210.0120.00314.47
5.5.200.0000.01114.50
5.5.190.0040.00814.25
5.5.180.0030.00814.00
5.5.170.0050.00314.37
5.5.160.0070.00714.29
5.5.150.0000.01114.28
5.5.140.0030.00713.88
5.5.130.0070.00314.09
5.5.120.0100.00314.38
5.5.110.0110.00314.01
5.5.100.0040.00814.20
5.5.90.0030.00514.19
5.5.80.0060.00614.05
5.5.70.0030.01014.14
5.5.60.0080.00814.26
5.5.50.0110.00414.43
5.5.40.0100.00314.32
5.5.30.0060.00613.95
5.5.20.0000.01314.27
5.5.10.0070.00714.28
5.5.00.0070.00714.22
5.4.450.0370.02815.31
5.4.440.0360.03015.28
5.4.430.0380.03415.11
5.4.420.0330.03215.26
5.4.410.0310.03115.10
5.4.400.0300.03714.92
5.4.390.0350.03114.84
5.4.380.0300.03415.02
5.4.370.0290.03014.92
5.4.360.0430.03314.88
5.4.350.0380.02615.22
5.4.340.0370.03015.10
5.4.330.0070.00010.73
5.4.320.0430.02515.14
5.4.310.0460.01815.06
5.4.300.0350.03915.13
5.4.290.0320.02815.11
5.4.280.0430.02514.99
5.4.270.0340.03014.88
5.4.260.0350.03215.10
5.4.250.0370.02814.83
5.4.240.0320.02814.96
5.4.230.0310.02714.85
5.4.220.0370.03014.91
5.4.210.0270.03215.14
5.4.200.0340.02714.85
5.4.190.0410.04015.01
5.4.180.0360.03814.97
5.4.170.0430.03115.02
5.4.160.0410.03314.92
5.4.150.0470.03315.06
5.4.140.0460.03513.49
5.4.130.0400.04113.60
5.4.120.0430.03613.75
5.4.110.0430.03913.61
5.4.100.0430.02513.68
5.4.90.0400.02913.65
5.4.80.0400.03513.78
5.4.70.0400.03313.82
5.4.60.0370.03413.71
5.4.50.0350.02713.76
5.4.40.0430.02313.52
5.4.30.0380.03313.62
5.4.20.0330.03013.65
5.4.10.0400.03813.62
5.4.00.0330.03213.23

preferences:
74.23 ms | 401 KiB | 5 Q