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(1); //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.0060.00918.16
8.3.50.0100.01016.35
8.3.40.0000.01518.60
8.3.30.0080.00818.55
8.3.20.0090.00019.07
8.3.10.0050.00321.96
8.3.00.0070.00319.41
8.2.180.0110.01116.63
8.2.170.0070.00722.96
8.2.160.0040.01122.96
8.2.150.0030.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00021.07
8.2.120.0050.00226.35
8.2.110.0130.00021.06
8.2.100.0120.00017.72
8.2.90.0030.00617.78
8.2.80.0060.00319.88
8.2.70.0050.00317.91
8.2.60.0040.00417.92
8.2.50.0050.00318.10
8.2.40.0090.00020.89
8.2.30.0030.00621.04
8.2.20.0000.00717.96
8.2.10.0040.00417.93
8.2.00.0040.00420.78
8.1.280.0110.00725.92
8.1.270.0000.00721.91
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.42
8.1.230.0070.00420.90
8.1.220.0040.00417.74
8.1.210.0000.00918.91
8.1.200.0060.00317.22
8.1.190.0030.00617.10
8.1.180.0080.00018.10
8.1.170.0040.00418.46
8.1.160.0040.00418.62
8.1.150.0030.00518.83
8.1.140.0030.00517.49
8.1.130.0030.00318.87
8.1.120.0040.00417.39
8.1.110.0040.00417.22
8.1.100.0000.00717.38
8.1.90.0050.00517.37
8.1.80.0040.00417.27
8.1.70.0000.00717.37
8.1.60.0040.00417.41
8.1.50.0000.00817.47
8.1.40.0030.00617.41
8.1.30.0030.00617.63
8.1.20.0050.00217.66
8.1.10.0000.00817.32
8.1.00.0000.00817.39
8.0.300.0030.00319.89
8.0.290.0080.00016.63
8.0.280.0040.00418.39
8.0.270.0000.00717.07
8.0.260.0060.00017.08
8.0.250.0060.00316.83
8.0.240.0030.00716.72
8.0.230.0030.00316.82
8.0.220.0000.00716.66
8.0.210.0000.00716.74
8.0.200.0000.00816.84
8.0.190.0000.00716.89
8.0.180.0040.00416.82
8.0.170.0050.00516.87
8.0.160.0000.00716.76
8.0.150.0000.00716.79
8.0.140.0040.00416.74
8.0.130.0060.00013.16
8.0.120.0030.00516.77
8.0.110.0040.00416.60
8.0.100.0000.00716.67
8.0.90.0000.00716.57
8.0.80.0150.00616.69
8.0.70.0040.00416.66
8.0.60.0040.00416.67
8.0.50.0030.00516.76
8.0.30.0100.00816.93
8.0.20.0090.01017.40
8.0.10.0050.00316.91
8.0.00.0100.00716.73
7.4.330.0060.00015.55
7.4.320.0070.00016.36
7.4.300.0060.00016.58
7.4.290.0040.00416.52
7.4.280.0000.00716.54
7.4.270.0040.00416.59
7.4.260.0040.00416.45
7.4.250.0040.00416.52
7.4.240.0000.00716.44
7.4.230.0070.00016.33
7.4.220.0070.00016.62
7.4.210.0060.00916.51
7.4.200.0030.00316.55
7.4.160.0110.00916.39
7.4.140.0100.01017.86
7.4.130.0110.00616.48
7.4.120.0100.01016.35
7.4.110.0060.01016.34
7.4.100.0140.00316.66
7.4.90.0030.01316.28
7.4.80.0120.00619.39
7.4.70.0070.01016.36
7.4.60.0090.00916.58
7.4.50.0100.00716.26
7.4.40.0080.00916.21
7.4.00.0040.00814.95
7.3.330.0050.00013.30
7.3.320.0000.00613.31
7.3.310.0030.00516.24
7.3.300.0040.00416.32
7.3.290.0030.00316.19
7.3.280.0060.01316.25
7.3.260.0090.01016.46
7.3.240.0080.00816.46
7.3.230.0100.00716.64
7.3.210.0090.01216.49
7.3.200.0120.00316.28
7.3.190.0060.00916.48
7.3.180.0060.00916.45
7.3.170.0100.01016.34
7.3.160.0040.01116.45
7.3.10.0100.00715.84
7.3.00.0000.01716.36
7.2.330.0030.01416.52
7.2.320.0070.01316.75
7.2.310.0070.01016.72
7.2.300.0040.01516.70
7.2.290.0090.01516.48
7.2.130.0090.00616.25
7.2.120.0070.01116.43
7.2.110.0080.00816.38
7.2.100.0060.00915.99
7.2.90.0090.00916.29
7.2.80.0090.00616.36
7.2.70.0080.00416.42
7.2.60.0030.00816.69
7.2.50.0040.01016.67
7.2.40.0360.01017.21
7.2.30.0500.00617.06
7.2.20.0420.00617.13
7.2.10.0470.00317.39
7.2.00.0450.00717.15
7.1.250.0080.00815.11
7.1.200.0110.00415.70
7.1.160.0870.01116.61
7.1.150.0760.00716.77
7.1.140.0950.00816.91
7.1.130.0710.00816.48
7.1.120.0640.00816.54
7.1.110.0770.01216.08
7.1.100.0620.00916.15
7.1.90.0910.00916.36
7.1.80.1160.01216.09
7.1.70.0730.01015.00
7.1.60.0680.01433.29
7.1.50.0660.00932.75
7.1.40.0690.00832.48
7.1.30.0690.01632.48
7.1.20.0720.00832.66
7.1.10.0770.00914.63
7.1.00.0600.00714.66

preferences:
53.3 ms | 400 KiB | 5 Q