3v4l.org

run code in 300+ PHP versions simultaneously
<?php function inverse($x) { if (!$x) { throw new Exception('Division by zero.'); } else return 1/$x; } try { echo inverse(5) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } finally { echo "First finally.\n"; } try { echo inverse(0) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; throw $e; } finally { echo "Second finally.\n"; } // Continue execution echo 'Hello World';

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.0100.01016.75
8.3.50.0090.00918.44
8.3.40.0110.00718.79
8.3.30.0060.00918.89
8.3.20.0120.00618.76
8.3.10.0030.00620.66
8.3.00.0050.00319.50
8.2.180.0150.00416.72
8.2.170.0110.00422.96
8.2.160.0100.00722.17
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00518.75
8.2.110.0040.00420.84
8.2.100.0000.01217.91
8.2.90.0000.00921.21
8.2.80.0060.00319.34
8.2.70.0050.00317.63
8.2.60.0030.00718.03
8.2.50.0060.00319.35
8.2.40.0000.00820.07
8.2.30.0040.00417.93
8.2.20.0030.00617.67
8.2.10.0000.00817.62
8.2.00.0040.00417.70
8.1.280.0150.00025.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00820.58
8.1.230.0050.00520.79
8.1.220.0080.00017.78
8.1.210.0000.00818.95
8.1.200.0060.00317.22
8.1.190.0000.00717.63
8.1.180.0000.00818.10
8.1.170.0000.00818.75
8.1.160.0040.00418.86
8.1.150.0040.00418.60
8.1.140.0040.00417.42
8.1.130.0000.00717.89
8.1.120.0040.00417.38
8.1.110.0040.00417.46
8.1.100.0040.00417.52
8.1.90.0070.00017.42
8.1.80.0050.00217.38
8.1.70.0040.00417.45
8.1.60.0000.00817.48
8.1.50.0000.00717.49
8.1.40.0040.00417.54
8.1.30.0080.00017.59
8.1.20.0040.00417.55
8.1.10.0040.00417.60
8.1.00.0040.00417.56
8.0.300.0040.00420.07
8.0.290.0040.00416.63
8.0.280.0000.00718.45
8.0.270.0000.00717.31
8.0.260.0000.00616.84
8.0.250.0000.00716.92
8.0.240.0050.00317.05
8.0.230.0040.00417.04
8.0.220.0030.00316.96
8.0.210.0030.00317.00
8.0.200.0000.00616.94
8.0.190.0000.00716.98
8.0.180.0030.00516.87
8.0.170.0030.00616.88
8.0.160.0050.00316.93
8.0.150.0000.00716.86
8.0.140.0080.00016.82
8.0.130.0000.00613.35
8.0.120.0040.00416.91
8.0.110.0000.00716.88
8.0.100.0000.00716.90
8.0.90.0040.00416.91
8.0.80.0030.01216.89
8.0.70.0050.00316.96
8.0.60.0080.00016.98
8.0.50.0040.00416.86
8.0.30.0120.00917.13
8.0.20.0080.01017.22
8.0.10.0060.00317.09
8.0.00.0130.00816.84
7.4.330.0020.00213.02
7.4.320.0030.00316.66
7.4.300.0030.00516.66
7.4.290.0030.00516.58
7.4.280.0050.00216.52
7.4.270.0070.00016.53
7.4.260.0020.00213.24
7.4.250.0040.00416.59
7.4.240.0030.00316.66
7.4.230.0000.00816.42
7.4.220.0150.00316.68
7.4.210.0100.00316.56
7.4.200.0000.00816.50
7.4.190.0070.00016.69
7.4.160.0100.00716.36
7.4.150.0090.00916.44
7.4.140.0090.01416.67
7.4.130.0160.00316.68
7.4.120.0060.01216.54
7.4.110.0120.00616.69
7.4.100.0100.00716.57
7.4.90.0110.00716.43
7.4.80.0110.00616.55
7.4.70.0100.00716.37
7.4.60.0100.00716.57
7.4.50.0050.00016.55
7.4.40.0100.00616.54
7.4.30.0070.01316.52
7.4.00.0100.00614.71
7.3.330.0000.00713.22
7.3.320.0000.00613.17
7.3.310.0040.00416.45
7.3.300.0000.00616.31
7.3.290.0080.00616.45
7.3.280.0060.01116.42
7.3.270.0090.00916.41
7.3.260.0120.00616.34
7.3.250.0090.01016.54
7.3.240.0080.01516.32
7.3.230.0090.01216.46
7.3.210.0110.01116.43
7.3.200.0120.00919.39
7.3.190.0160.00316.57
7.3.180.0090.00616.49
7.3.170.0130.00316.35
7.3.160.0100.00616.56
7.3.120.0040.01114.94
7.2.330.0110.00716.50
7.2.320.0040.01416.79
7.2.310.0100.01316.61
7.2.300.0040.01416.60
7.2.290.0090.00616.63
7.2.60.0100.00716.84
7.1.200.0060.00315.74
7.1.70.0000.00917.10
7.1.60.0030.02019.31
7.1.50.0060.01616.88
7.1.00.0030.06022.43
7.0.200.0670.00714.60
7.0.140.0100.07021.99
7.0.120.0000.06722.18
7.0.60.0000.07721.84
7.0.50.0070.04317.89
7.0.40.0200.07720.11
7.0.30.0400.03320.33
7.0.20.0200.08020.09
7.0.10.0170.06020.16
7.0.00.0030.06320.23
5.6.280.0000.07721.07
5.6.210.0000.09020.63
5.6.200.0100.07718.19
5.6.190.0000.05720.52
5.6.180.0100.04720.34
5.6.170.0170.08320.58
5.6.160.0030.07720.46
5.6.150.0170.04318.14
5.6.140.0030.04018.28
5.6.130.0030.05318.23
5.6.120.0030.09021.04
5.6.110.0030.04021.06
5.6.100.0070.04020.89
5.6.90.0030.08321.00
5.6.80.0070.05320.45
5.5.350.0070.08020.34
5.5.340.0030.08017.99
5.5.330.0100.03720.27
5.5.320.0600.06720.35
5.5.310.0200.08020.27
5.5.300.0070.06717.95
5.5.290.0170.07017.98
5.5.280.0070.05320.87
5.5.270.0000.09320.88
5.5.260.0170.07320.89
5.5.250.0000.05020.61
5.5.240.0100.08720.22
5.4.450.0070.04019.18
5.4.440.0070.03719.18
5.4.430.0030.03719.24
5.4.420.0100.03019.32
5.4.410.0100.03019.43
5.4.400.0170.03018.98
5.4.390.0000.04319.14
5.4.380.0130.03019.02
5.4.370.0070.03319.26
5.4.360.0070.03719.11
5.4.350.0000.04019.08
5.4.340.0100.03018.98
5.4.320.0070.05318.88
5.4.310.0070.06019.20
5.4.300.0000.08018.92
5.4.290.0030.05018.85
5.4.280.0030.04019.15
5.4.270.0030.07019.14
5.4.260.0070.07719.24
5.4.250.0000.05019.19
5.4.240.0030.07719.20
5.4.230.0070.05018.97
5.4.220.0100.07719.14
5.4.210.0170.06719.15
5.4.200.0100.04019.07
5.4.190.0000.07319.14
5.4.180.0070.04718.97
5.4.170.0100.06019.13
5.4.160.0100.05718.86
5.4.150.0130.03319.18
5.4.140.0030.06016.43
5.4.130.0070.07016.29
5.4.120.0070.07716.35
5.4.110.0070.04316.41
5.4.100.0030.07316.37
5.4.90.0070.03716.53
5.4.80.0070.04016.29
5.4.70.0070.07016.37
5.4.60.0170.05716.27
5.4.50.0070.07016.45
5.4.40.0130.03716.36
5.4.30.0070.05016.59
5.4.20.0170.06016.64
5.4.10.0070.06316.36
5.4.00.0100.05015.84
5.3.290.0030.04014.71
5.3.280.0130.07314.66
5.3.270.0000.04314.66
5.3.260.0030.05314.77
5.3.250.0030.05014.49
5.3.240.0170.06314.49
5.3.230.0070.07714.67
5.3.220.0100.04314.60
5.3.210.0100.07314.57
5.3.200.0030.04314.62
5.3.190.0070.07014.60
5.3.180.0070.07314.48
5.3.170.0100.06314.62
5.3.160.0070.06314.61
5.3.150.0100.06314.57
5.3.140.0100.07014.57
5.3.130.0070.08014.57
5.3.120.0170.06714.60
5.3.110.0030.04014.60
5.3.100.0030.06014.04
5.3.90.0100.07014.02
5.3.80.0170.06013.96
5.3.70.0130.06314.07
5.3.60.0130.06714.02
5.3.50.0100.05014.10
5.3.40.0070.07013.84
5.3.30.0100.05713.91
5.3.20.0070.03313.61
5.3.10.0130.05313.54
5.3.00.0100.07013.68
5.2.170.0070.06011.30
5.2.160.0070.03311.18
5.2.150.0030.06311.18
5.2.140.0130.05311.15
5.2.130.0070.05711.25
5.2.120.0030.06011.18
5.2.110.0100.04011.10
5.2.100.0000.05711.17
5.2.90.0030.06311.25
5.2.80.0030.04311.09
5.2.70.0070.05711.09
5.2.60.0030.04311.11
5.2.50.0030.06711.01
5.2.40.0030.06010.91
5.2.30.0100.05311.02
5.2.20.0070.04011.00
5.2.10.0000.06310.83
5.2.00.0070.03310.72
5.1.60.0030.04010.06
5.1.50.0030.05310.04
5.1.40.0130.0479.93
5.1.30.0000.05010.48
5.1.20.0030.02710.36
5.1.10.0000.03010.07
5.1.00.0030.03310.09
5.0.50.0000.0508.50
5.0.40.0070.0438.41
5.0.30.0030.0708.24
5.0.20.0030.0238.34
5.0.10.0000.0478.32
5.0.00.0030.0638.14
4.4.90.0000.0377.82
4.4.80.0000.0207.82
4.4.70.0000.0337.82
4.4.60.0030.0377.82
4.4.50.0000.0307.82
4.4.40.0000.0377.82
4.4.30.0000.0337.82
4.4.20.0030.0337.82
4.4.10.0070.0137.82
4.4.00.0000.0407.82
4.3.110.0030.0377.82
4.3.100.0030.0277.82
4.3.90.0030.0137.82
4.3.80.0070.0477.82
4.3.70.0000.0377.82
4.3.60.0030.0337.82
4.3.50.0070.0177.82
4.3.40.0000.0507.82
4.3.30.0000.0377.82
4.3.20.0000.0207.82
4.3.10.0000.0237.82
4.3.00.0030.0337.82

preferences:
47.98 ms | 401 KiB | 5 Q