3v4l.org

run code in 300+ PHP versions simultaneously
<?php //create function with an exception function checkNum($number) { if($number>1) { throw new Exception("Value must be 1 or below"); } return true; } //trigger exception in a "try" block try { checkNum(2); //If the exception is thrown, this text will not be shown echo 'If you see this, the number is 1 or below'; } //catch exception catch(Exception $e) { echo 'Message: ' .$e->getMessage(); } ?>

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.0030.01018.52
8.3.50.0100.00722.11
8.3.40.0140.00018.80
8.3.30.0140.00718.61
8.3.20.0000.00818.73
8.3.10.0050.00320.48
8.3.00.0070.00721.90
8.2.180.0070.01016.63
8.2.170.0100.01022.96
8.2.160.0130.00320.22
8.2.150.0080.00024.18
8.2.140.0050.00524.66
8.2.130.0060.00326.16
8.2.120.0000.00819.48
8.2.110.0030.00620.29
8.2.100.0120.00017.72
8.2.90.0050.00219.17
8.2.80.0090.00018.04
8.2.70.0080.00017.63
8.2.60.0040.00417.91
8.2.50.0070.00318.07
8.2.40.0050.00218.28
8.2.30.0070.00019.77
8.2.20.0000.00717.73
8.2.10.0000.00717.75
8.2.00.0040.00417.75
8.1.280.0090.00625.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0000.00922.59
8.1.230.0060.00620.68
8.1.220.0040.00418.77
8.1.210.0060.00318.84
8.1.200.0000.01017.35
8.1.190.0000.00917.63
8.1.180.0000.00918.10
8.1.170.0050.00318.53
8.1.160.0040.00418.82
8.1.150.0070.00018.64
8.1.140.0000.00817.46
8.1.130.0000.00717.84
8.1.120.0000.00717.47
8.1.110.0050.00217.45
8.1.100.0040.00417.47
8.1.90.0030.00317.43
8.1.80.0030.00617.52
8.1.70.0030.00317.48
8.1.60.0060.00317.59
8.1.50.0000.00817.46
8.1.40.0000.00817.55
8.1.30.0000.00717.55
8.1.20.0040.00417.73
8.1.10.0050.00317.63
8.1.00.0000.00817.39
8.0.300.0000.00719.98
8.0.290.0000.00717.05
8.0.280.0070.00018.45
8.0.270.0070.00017.29
8.0.260.0060.00016.89
8.0.250.0030.00417.05
8.0.240.0050.00317.02
8.0.230.0050.00316.90
8.0.220.0070.00016.93
8.0.210.0040.00416.85
8.0.200.0000.00617.07
8.0.190.0020.00517.02
8.0.180.0030.00517.01
8.0.170.0060.00316.97
8.0.160.0000.00717.00
8.0.150.0050.00316.98
8.0.140.0030.00516.81
8.0.130.0030.00313.41
8.0.120.0000.00816.89
8.0.110.0000.00816.87
8.0.100.0040.00416.86
8.0.90.0040.00416.97
8.0.80.0060.01016.86
8.0.70.0040.00416.99
8.0.60.0040.00417.05
8.0.50.0000.00716.98
8.0.30.0060.01317.05
8.0.20.0160.01917.40
8.0.10.0050.00317.01
8.0.00.0120.00916.63
7.4.330.0050.00014.77
7.4.320.0080.00016.40
7.4.300.0040.00416.63
7.4.290.0000.00716.61
7.4.280.0000.00716.59
7.4.270.0040.00416.60
7.4.260.0000.00613.34
7.4.250.0030.00616.50
7.4.240.0040.00416.62
7.4.230.0030.00316.59
7.4.220.0070.01116.52
7.4.210.0060.00916.52
7.4.200.0070.00016.50
7.4.190.0030.00316.48
7.4.160.0130.00316.52
7.4.150.0080.00917.40
7.4.140.0120.00617.86
7.4.130.0110.00716.53
7.4.120.0120.00816.55
7.4.110.0100.00716.63
7.4.100.0090.01216.56
7.4.90.0140.00316.52
7.4.80.0070.01019.04
7.4.70.0180.00316.55
7.4.60.0130.01016.38
7.4.50.0000.00716.51
7.4.40.0040.01422.27
7.4.30.0150.01016.51
7.4.00.0050.00914.92
7.3.330.0000.00513.28
7.3.320.0050.00013.17
7.3.310.0000.00716.48
7.3.300.0000.00716.28
7.3.290.0070.00716.32
7.3.280.0100.00916.33
7.3.270.0160.00017.40
7.3.260.0160.00818.24
7.3.250.0150.00316.48
7.3.240.0100.00716.39
7.3.230.0080.00816.39
7.3.210.0070.01016.48
7.3.200.0040.01719.39
7.3.190.0120.00916.39
7.3.180.0080.00816.53
7.3.170.0120.00416.29
7.3.160.0040.01216.52
7.3.120.0080.01014.90
7.3.110.0090.00614.78
7.3.100.0070.00714.78
7.3.90.0000.01214.89
7.3.80.0060.00614.86
7.3.70.0030.00714.72
7.3.60.0060.00914.71
7.3.50.0040.00815.04
7.3.40.0030.00614.57
7.3.30.0120.00014.71
7.3.20.0030.00916.48
7.3.10.0080.00416.61
7.3.00.0100.00016.55
7.2.330.0030.01716.83
7.2.320.0030.01316.62
7.2.310.0100.00716.53
7.2.300.0070.01016.69
7.2.290.0100.00716.84
7.2.250.0100.01015.05
7.2.240.0090.00615.01
7.2.230.0110.00415.35
7.2.220.0040.01115.04
7.2.210.0060.00314.97
7.2.200.0070.00715.13
7.2.190.0070.01015.03
7.2.180.0060.00615.01
7.2.170.0060.01015.06
7.2.00.0030.01019.36
7.1.330.0030.00915.94
7.1.320.0080.00415.85
7.1.310.0070.00715.48
7.1.300.0070.00715.47
7.1.290.0110.00015.94
7.1.280.0040.01215.68
7.1.270.0070.00715.64
7.1.260.0080.00415.73
7.1.100.0060.00618.34
7.1.70.0000.00717.29
7.1.60.0090.01619.40
7.1.50.0090.00916.96
7.1.00.0000.07322.57
7.0.200.0000.00716.82
7.0.140.0030.07322.08
7.0.60.0030.07721.71
7.0.50.0030.08317.97
7.0.40.0030.04317.76
7.0.30.0100.03717.80
7.0.20.0100.07017.84
7.0.10.0100.05317.75
7.0.00.0100.06717.71
5.6.280.0100.06720.89
5.6.210.0130.06320.57
5.6.200.0030.04318.12
5.6.190.0130.03318.23
5.6.180.0000.04318.28
5.6.170.0100.07018.27
5.6.160.0030.06318.12
5.6.150.0070.06018.28
5.6.140.0070.07718.18
5.6.130.0070.04318.12
5.6.120.0030.04318.12
5.6.110.0030.06718.22
5.6.100.0030.04718.14
5.6.90.0030.05718.21
5.6.80.0100.07317.66
5.6.70.0030.07317.50
5.6.60.0130.07017.54
5.6.50.0070.08017.66
5.6.40.0000.04317.55
5.6.30.0070.07317.57
5.6.20.0100.04317.50
5.6.10.0070.06717.56
5.6.00.0170.07017.52
5.5.350.0370.07020.36
5.5.340.0070.04017.98
5.5.330.0070.08017.95
5.5.320.0030.04017.95
5.5.310.0070.08017.97
5.5.300.0000.08718.05
5.5.290.0130.07717.97
5.5.280.0070.07717.98
5.5.270.0130.08018.04
5.5.260.0070.08018.04
5.5.250.0070.03717.80
5.5.240.0130.07017.37
5.5.230.0030.08017.41
5.5.220.0070.08017.33
5.5.210.0030.06717.30
5.5.200.0000.04717.29
5.5.190.0100.07317.33
5.5.180.0030.08317.38
5.5.160.0030.05717.43
5.5.150.0170.07017.30
5.5.140.0100.05017.34
5.5.130.0130.04017.29
5.5.120.0030.07317.39
5.5.110.0070.07317.33
5.5.100.0030.08317.18
5.5.90.0030.07017.26
5.5.80.0170.06717.23
5.5.70.0000.05017.27
5.5.60.0100.07317.27
5.5.50.0070.07017.20
5.5.40.0230.06017.16
5.5.30.0000.08017.18
5.5.20.0100.07017.32
5.5.10.0130.07017.23
5.5.00.0130.04317.18
5.4.450.0000.05719.39
5.4.440.0030.08319.23
5.4.430.0030.04319.38
5.4.420.0070.05319.43
5.4.410.0070.04719.47
5.4.400.0100.06719.14
5.4.390.0130.05019.02
5.4.380.0070.08319.02
5.4.370.0030.07019.03
5.4.360.0130.07018.98
5.4.350.0070.05019.14
5.4.340.0100.04318.97
5.4.320.0130.06319.00
5.4.310.0030.05018.98
5.4.300.0070.07019.13
5.4.290.0130.07018.95
5.4.280.0130.06719.05
5.4.270.0030.08719.14
5.4.260.0130.07319.03
5.4.250.0200.05319.26
5.4.240.0030.05019.09
5.4.230.0070.07719.04
5.4.220.0030.06319.27
5.4.210.0130.05019.26
5.4.200.0070.07719.01
5.4.190.0030.06719.04
5.4.180.0200.06319.03
5.4.170.0030.08319.11
5.4.160.0070.08319.08
5.4.150.0130.07318.87
5.4.140.0170.06716.43
5.4.130.0070.07716.43
5.4.120.0030.07016.43
5.4.110.0030.06016.57
5.4.100.0170.04016.55
5.4.90.0130.06016.45
5.4.80.0070.07016.36
5.4.70.0100.06716.39
5.4.60.0030.04316.43
5.4.50.0070.03316.43
5.4.40.0070.03716.48
5.4.30.0070.03016.55
5.4.20.0030.03316.56
5.4.10.0030.03316.35
5.4.00.0070.03015.85
5.3.290.0130.07014.70
5.3.280.0030.07014.66
5.3.270.0130.05014.66
5.3.260.0030.05314.60
5.3.250.0070.08014.46
5.3.240.0070.05714.68
5.3.230.0030.07714.55
5.3.220.0000.08014.57
5.3.210.0070.07714.63
5.3.200.0030.07714.64
5.3.190.0030.08014.61
5.3.180.0030.05014.52
5.3.170.0170.06714.63
5.3.160.0130.05014.55
5.3.150.0000.04014.59
5.3.140.0000.04014.65
5.3.130.0000.04014.54
5.3.120.0070.03314.54
5.3.110.0030.03714.55
5.3.100.0000.03714.24
5.3.90.0000.04014.07
5.3.80.0000.03714.02
5.3.70.0000.03714.22
5.3.60.0000.03713.89
5.3.50.0030.04313.84
5.3.40.0000.03713.94
5.3.30.0100.02713.96
5.3.20.0000.03713.73
5.3.10.0030.03313.66
5.3.00.0030.03713.62
5.2.170.0000.03011.19
5.2.160.0000.03011.05
5.2.150.0030.02711.18
5.2.140.0030.02711.35
5.2.130.0030.03311.12
5.2.120.0070.02311.11
5.2.110.0000.03011.16
5.2.100.0070.02310.95
5.2.90.0000.03011.14
5.2.80.0030.02711.08
5.2.70.0000.03010.98
5.2.60.0030.02711.09
5.2.50.0000.03010.91
5.2.40.0070.02311.02
5.2.30.0000.03310.94
5.2.20.0000.03310.92
5.2.10.0000.03010.87
5.2.00.0030.02710.62
5.1.60.0000.0239.97
5.1.50.0030.02310.05
5.1.40.0030.02710.04
5.1.30.0000.02710.39
5.1.20.0000.02710.34
5.1.10.0000.02710.14
5.1.00.0030.03010.28
5.0.50.0000.0208.54
5.0.40.0000.0208.39
5.0.30.0030.0338.35
5.0.20.0030.0178.35
5.0.10.0030.0278.35
5.0.00.0000.0378.35
4.4.90.0000.0178.35
4.4.80.0000.0178.35
4.4.70.0000.0178.35
4.4.60.0100.0108.35
4.4.50.0000.0178.35
4.4.40.0000.0278.35
4.4.30.0030.0138.35
4.4.20.0000.0178.35
4.4.10.0030.0138.35
4.4.00.0000.0238.35
4.3.110.0000.0208.35
4.3.100.0000.0238.35
4.3.90.0070.0308.35
4.3.80.0000.0338.35
4.3.70.0070.0308.35
4.3.60.0070.0208.35
4.3.50.0000.0408.35
4.3.40.0000.0538.35
4.3.30.0030.0308.35
4.3.20.0000.0308.35
4.3.10.0000.0408.35
4.3.00.0030.0338.35

preferences:
52.01 ms | 400 KiB | 5 Q