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(); //Value must be 1 or below }

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.0090.00618.43
8.3.50.0140.00416.51
8.3.40.0040.01218.88
8.3.30.0070.00718.89
8.3.20.0080.00018.94
8.3.10.0030.00621.90
8.3.00.0000.01019.56
8.2.180.0110.00716.88
8.2.170.0110.00722.96
8.2.160.0070.00722.21
8.2.150.0000.00724.18
8.2.140.0050.00324.66
8.2.130.0080.00021.04
8.2.120.0000.00726.35
8.2.110.0030.00621.12
8.2.100.0060.00617.91
8.2.90.0040.00417.72
8.2.80.0000.00919.95
8.2.70.0030.00617.93
8.2.60.0000.00818.04
8.2.50.0000.00818.10
8.2.40.0000.00820.76
8.2.30.0000.00821.27
8.2.20.0000.00818.16
8.2.10.0030.00617.93
8.2.00.0000.00719.12
8.1.280.0070.01025.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00322.47
8.1.230.0070.00420.84
8.1.220.0040.00417.79
8.1.210.0040.00418.88
8.1.200.0050.00317.36
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0050.00318.89
8.1.150.0050.00318.89
8.1.140.0040.00417.74
8.1.130.0000.00619.08
8.1.120.0050.00317.46
8.1.110.0070.00017.49
8.1.100.0070.00017.35
8.1.90.0060.00317.48
8.1.80.0030.00617.43
8.1.70.0030.00317.52
8.1.60.0030.00517.59
8.1.50.0000.00817.58
8.1.40.0000.00817.41
8.1.30.0000.00817.71
8.1.20.0000.00717.63
8.1.10.0000.00817.56
8.1.00.0000.00717.48
8.0.300.0060.00319.89
8.0.290.0040.00416.75
8.0.280.0000.00818.45
8.0.270.0000.00717.15
8.0.260.0060.00017.14
8.0.250.0040.00417.01
8.0.240.0000.00716.94
8.0.230.0000.00717.08
8.0.220.0030.00316.93
8.0.210.0030.00316.94
8.0.200.0030.00517.00
8.0.190.0070.00016.98
8.0.180.0000.00716.96
8.0.170.0030.00616.89
8.0.160.0000.00716.89
8.0.150.0040.00416.93
8.0.140.0000.00816.94
8.0.130.0060.00013.35
8.0.120.0040.00416.88
8.0.110.0030.00516.84
8.0.100.0070.00016.96
8.0.90.0020.00516.98
8.0.80.0060.01316.91
8.0.70.0070.00016.85
8.0.60.0030.00516.79
8.0.50.0000.00817.00
8.0.30.0070.01117.08
8.0.20.0120.00817.40
8.0.10.0080.00016.96
8.0.00.0130.00516.93
7.4.330.0020.00215.55
7.4.320.0000.00716.55
7.4.300.0000.00616.52
7.4.290.0030.00316.50
7.4.280.0030.00516.51
7.4.270.0030.00616.50
7.4.260.0070.00016.62
7.4.250.0070.00016.47
7.4.240.0030.00316.50
7.4.230.0050.00216.67
7.4.220.0000.00816.40
7.4.210.0080.00816.59
7.4.200.0030.00316.63
7.4.160.0070.00816.46
7.4.140.0070.01217.86
7.4.130.0100.00616.54
7.4.120.0090.01116.45
7.4.110.0100.00716.51
7.4.100.0060.01016.61
7.4.90.0100.00616.54
7.4.80.0130.00619.39
7.4.70.0060.01316.53
7.4.60.0080.01016.53
7.4.50.0040.01416.66
7.4.40.0100.00716.71
7.4.00.0080.00514.89
7.3.330.0000.00513.29
7.3.320.0030.00313.20
7.3.310.0040.00416.47
7.3.300.0050.00216.22
7.3.290.0040.00416.32
7.3.280.0100.00516.31
7.3.260.0080.01016.60
7.3.240.0080.00816.41
7.3.230.0100.00716.50
7.3.210.0140.00716.52
7.3.200.0040.01116.49
7.3.190.0030.01316.55
7.3.180.0130.00316.57
7.3.170.0040.01116.61
7.3.160.0080.00816.30
7.3.120.0000.01514.87
7.3.110.0030.01114.95
7.3.100.0060.00914.82
7.3.90.0030.01214.79
7.3.80.0060.01314.93
7.3.70.0060.01014.92
7.3.60.0000.01714.87
7.3.50.0090.00614.75
7.3.40.0110.00014.70
7.3.30.0040.00814.86
7.3.20.0060.00616.90
7.3.10.0060.00816.86
7.3.00.0100.00516.61
7.2.330.0100.01316.57
7.2.320.0110.00616.51
7.2.310.0090.00916.78
7.2.300.0070.01016.35
7.2.290.0090.00916.49
7.2.250.0070.01015.11
7.2.240.0120.00615.28
7.2.230.0120.00615.31
7.2.220.0030.01014.63
7.2.210.0060.01314.94
7.2.200.0040.01514.90
7.2.190.0070.00715.11
7.2.180.0070.01114.95
7.2.170.0060.00615.23
7.2.130.0090.00317.02
7.2.120.0040.01116.91
7.2.110.0030.00616.93
7.2.100.0030.01016.95
7.2.90.0070.00716.92
7.2.80.0080.00417.07
7.2.70.0040.00816.92
7.2.60.0050.00716.99
7.2.50.0020.01216.99
7.2.40.0430.01017.49
7.2.30.0390.01417.52
7.2.20.0470.00717.44
7.2.10.0430.00617.51
7.2.00.0480.00817.46
7.1.330.0040.01115.80
7.1.320.0000.01615.91
7.1.310.0130.00615.78
7.1.300.0090.00615.76
7.1.290.0090.00915.50
7.1.280.0060.00615.84
7.1.270.0100.00615.61
7.1.260.0100.00315.52
7.1.250.0110.00015.87
7.1.200.0000.01215.52
7.1.160.0410.00717.00
7.1.150.0740.00817.05
7.1.140.0700.00916.82
7.1.130.0570.00916.83
7.1.120.0920.00816.88
7.1.110.0950.00516.11
7.1.100.0750.01016.35
7.1.90.1350.00616.29
7.1.80.0340.00816.02
7.1.70.1140.00615.36
7.1.60.1060.01533.19
7.1.50.1190.01432.90
7.1.40.1300.01132.46
7.1.30.1020.01132.67
7.1.20.1190.00932.91
7.1.10.0940.01014.74
7.1.00.0980.00714.75

preferences:
71.16 ms | 400 KiB | 5 Q