3v4l.org

run code in 300+ PHP versions simultaneously
<?php //creating a function containing a potential exception function checkNumber($number) { if($number > 1) { throw new Exception('The value has to be 1 or lower'); } return true; } //triggering the exception inside a try() try { checkNumber(2); //In case the exception gets thrown, this is the message that is shown. echo 'The value is 1 or lower'; } catch(Exception $e) { //catching the exception 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.0070.01116.75
8.3.50.0130.00716.55
8.3.40.0140.00418.97
8.3.30.0090.00618.70
8.3.20.0070.00024.18
8.3.10.0070.00024.66
8.3.00.0070.00026.16
8.2.180.0120.00925.92
8.2.170.0110.00418.82
8.2.160.0100.00722.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0040.00426.35
8.2.110.0030.00622.24
8.2.100.0080.00419.40
8.2.90.0040.00417.63
8.2.80.0040.00418.77
8.2.70.0030.00617.50
8.2.60.0040.00417.80
8.2.50.0060.00318.05
8.2.40.0040.00418.03
8.2.30.0050.00218.16
8.2.20.0050.00217.94
8.2.10.0040.00419.25
8.2.00.0030.00719.30
8.1.280.0080.00625.92
8.1.270.0060.00323.99
8.1.260.0030.00628.09
8.1.250.0070.00028.09
8.1.240.0060.00323.92
8.1.230.0110.00020.88
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0040.00417.25
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00518.50
8.1.160.0040.00419.06
8.1.150.0050.00218.80
8.1.140.0000.00718.77
8.1.130.0030.00520.14
8.1.120.0050.00317.49
8.1.110.0040.00417.44
8.1.100.0050.00217.44
8.1.90.0070.00017.51
8.1.80.0070.00017.37
8.1.70.0070.00017.43
8.1.60.0040.00417.51
8.1.50.0000.00717.58
8.1.40.0090.00017.51
8.1.30.0040.00417.75
8.1.20.0000.01017.63
8.1.10.0040.00417.55
8.1.00.0030.00617.40
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.43
8.0.270.0020.00518.08
8.0.260.0000.00718.44
8.0.250.0000.00916.90
8.0.240.0040.00416.91
8.0.230.0000.00816.98
8.0.220.0040.00416.95
8.0.210.0030.00316.93
8.0.200.0000.00716.97
8.0.190.0060.00316.90
8.0.180.0050.00216.98
8.0.170.0000.00816.98
8.0.160.0050.00317.04
8.0.150.0030.00516.86
8.0.140.0070.00316.92
8.0.130.0000.00613.43
8.0.120.0000.00716.96
8.0.110.0070.00016.84
8.0.100.0000.00816.75
8.0.90.0050.00316.85
8.0.80.0070.01216.98
8.0.70.0000.00716.82
8.0.60.0040.00416.84
8.0.50.0040.00416.90
8.0.30.0270.00816.87
8.0.20.0420.01316.95
8.0.10.0220.01116.99
8.0.00.0270.00917.02
7.4.330.0040.00015.55
7.4.320.0030.00316.50
7.4.300.0000.00716.49
7.4.290.0080.00016.44
7.4.280.0000.00816.45
7.4.270.0000.00716.58
7.4.260.0030.00313.26
7.4.250.0030.00316.57
7.4.240.0000.00616.59
7.4.230.0050.00216.63
7.4.220.0030.00516.57
7.4.210.0070.00716.55
7.4.200.0000.00716.44
7.4.160.0250.01416.59
7.4.150.0340.00816.53
7.4.140.0230.00916.45
7.4.130.0210.00716.47
7.4.120.0220.00916.42
7.4.110.0220.00916.45
7.4.100.0240.01016.51
7.4.90.0240.00616.45
7.4.80.0190.00816.42
7.4.70.0200.00716.39
7.4.60.0190.00916.39
7.4.50.0230.00516.32
7.4.40.0220.01016.34
7.4.30.0220.00516.36
7.4.20.0240.01216.35
7.4.10.0210.00816.41
7.4.00.0170.01016.36
7.3.330.0030.00316.16
7.3.320.0030.00413.14
7.3.310.0020.00516.37
7.3.300.0000.00716.33
7.3.290.0110.00716.36
7.3.280.0130.01116.26
7.3.270.0230.00916.33
7.3.260.0410.00716.31
7.3.250.0240.00616.28
7.3.240.0230.00816.32
7.3.230.0290.01216.28
7.3.220.0280.00616.30
7.3.210.0160.01416.30
7.3.200.0190.00816.36
7.3.190.0240.00616.31
7.3.180.0190.01016.29
7.3.170.0190.01216.28
7.3.160.0240.01116.34
7.3.150.0190.01316.29
7.3.140.0190.01216.31
7.3.130.0240.00716.34
7.3.120.0220.00616.27
7.3.110.0220.00716.23
7.3.100.0190.00816.14
7.3.90.0170.01316.54
7.3.80.0190.00916.29
7.3.70.0190.00916.37
7.3.60.0160.01516.43
7.3.50.0210.00816.36
7.3.40.0190.01416.40
7.3.30.0240.00916.42
7.3.20.0240.00616.48
7.3.10.0190.01216.38
7.3.00.0230.00716.42

preferences:
31.55 ms | 400 KiB | 5 Q