3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(ticks=1); function tick_handler() { echo "tick_handler() called\n"; } function inverse($x) {tick_handler(); if ($x=FALSE) {tick_handler(); throw new Exception('Division by zero.'); tick_handler(); } return 1/$x; tick_handler(); } try { echo inverse(5) . "\n"; echo inverse(FALSE) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } ?>

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.0110.00418.68
8.3.50.0110.00817.34
8.3.40.0040.01118.79
8.3.30.0120.00318.89
8.3.20.0040.01118.91
8.3.10.0000.00820.52
8.3.00.0040.00417.75
8.2.180.0180.00316.63
8.2.170.0070.01022.96
8.2.160.0070.00722.13
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.89
8.2.110.0110.00021.07
8.2.100.0040.00717.91
8.2.90.0030.00619.23
8.2.80.0080.00017.80
8.2.70.0060.00317.75
8.2.60.0060.00318.05
8.2.50.0000.00818.07
8.2.40.0040.00418.26
8.2.30.0070.00018.06
8.2.20.0000.00717.77
8.2.10.0040.00417.76
8.2.00.0050.00217.68
8.1.280.0120.00325.92
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00619.13
8.1.230.0110.00020.86
8.1.220.0030.00617.79
8.1.210.0080.00018.77
8.1.200.0000.00817.35
8.1.190.0080.00017.64
8.1.180.0040.00418.10
8.1.170.0000.00918.57
8.1.160.0040.00418.87
8.1.150.0020.00518.57
8.1.140.0040.00717.26
8.1.130.0070.00017.77
8.1.120.0040.00417.31
8.1.110.0080.00017.44
8.1.100.0020.00517.28
8.1.90.0030.00517.43
8.1.80.0050.00317.32
8.1.70.0070.00017.34
8.1.60.0000.00717.65
8.1.50.0040.00417.43
8.1.40.0040.00417.52
8.1.30.0050.00317.65
8.1.20.0050.00317.69
8.1.10.0000.00817.44
8.1.00.0000.00717.49
8.0.300.0070.00019.90
8.0.290.0000.00716.63
8.0.280.0030.00318.40
8.0.270.0000.00717.20
8.0.260.0030.00316.86
8.0.250.0050.00317.02
8.0.240.0030.00616.89
8.0.230.0000.00716.95
8.0.220.0030.00316.99
8.0.210.0070.00016.90
8.0.200.0000.00916.82
8.0.190.0000.00716.92
8.0.180.0040.00416.97
8.0.170.0040.00416.79
8.0.160.0000.00716.80
8.0.150.0000.00816.86
8.0.140.0040.00416.87
8.0.130.0000.00513.41
8.0.120.0050.00316.86
8.0.110.0020.00516.71
8.0.100.0000.00716.73
8.0.90.0000.00716.89
8.0.80.0000.01416.77
8.0.70.0040.00416.84
8.0.60.0040.00416.85
8.0.50.0000.00816.79
8.0.30.0100.00716.89
8.0.20.0100.00817.24
8.0.10.0000.00716.89
8.0.00.0050.01116.71
7.4.330.0000.00514.77
7.4.320.0030.00316.52
7.4.300.0060.00016.48
7.4.290.0030.00316.51
7.4.280.0060.00316.43
7.4.270.0000.00716.36
7.4.260.0030.00313.20
7.4.250.0040.00416.57
7.4.240.0020.00516.62
7.4.230.0030.00416.70
7.4.220.0090.00616.44
7.4.210.0070.00716.43
7.4.200.0040.00416.62
7.4.190.0030.00316.66
7.4.160.0030.01216.50
7.4.150.0100.00717.07
7.4.140.0080.00817.13
7.4.130.0060.01316.62
7.4.120.0100.00816.51
7.4.110.0030.01316.57
7.4.100.0060.01716.55
7.4.90.0040.01316.53
7.4.80.0060.01318.80
7.4.70.0100.00616.40
7.4.60.0130.00316.58
7.4.50.0050.00023.42
7.4.40.0040.01121.69
7.4.30.0070.01016.49
7.4.00.0040.01414.76
7.3.330.0030.00313.36
7.3.320.0070.00013.12
7.3.310.0000.00816.38
7.3.300.0070.00016.38
7.3.290.0100.01016.37
7.3.280.0100.00816.34
7.3.270.0090.00917.07
7.3.260.0090.00818.24
7.3.250.0090.00916.40
7.3.240.0040.01416.61
7.3.230.0090.00616.34
7.3.210.0030.01516.37
7.3.200.0140.00319.39
7.3.190.0040.01816.56
7.3.180.0040.01116.29
7.3.170.0100.00616.42
7.3.160.0060.01016.38
7.3.120.0070.00714.82
7.2.330.0070.01016.59
7.2.320.0030.01316.35
7.2.310.0100.01016.80
7.2.300.0140.00316.55
7.2.290.0070.01016.42
7.2.60.0000.01216.81
7.2.00.0030.01019.43
7.1.200.0000.01415.64
7.1.100.0060.00318.27
7.1.70.0060.01216.86
7.1.60.0030.01519.40
7.1.50.0060.01617.02
7.1.00.0100.07022.44
7.0.200.0000.01216.72
7.0.140.0030.06722.00
7.0.120.0030.03322.05
7.0.60.0300.08020.05
7.0.50.0070.07017.91
7.0.40.0070.05320.19
7.0.30.0270.07320.11
7.0.20.0300.06020.06
7.0.10.0130.07320.12
7.0.00.0130.08020.23
5.6.280.0030.07021.08
5.6.210.0000.04320.75
5.6.200.0000.04718.26
5.6.190.0070.05720.55
5.6.180.0300.06320.48
5.6.170.0270.03020.62
5.6.160.0000.04320.46
5.6.150.0130.07718.25
5.6.140.0100.07718.28
5.6.130.0030.05718.28
5.6.120.0070.06021.08
5.6.110.0070.05320.95
5.6.100.0230.06720.96
5.6.90.0070.07720.89
5.6.80.0100.07720.36
5.5.350.0000.07020.44
5.5.340.0100.07018.05
5.5.330.0070.09020.47
5.5.320.0230.04720.42
5.5.310.0270.07720.30
5.5.300.0070.03717.98
5.5.290.0000.05718.07
5.5.280.0070.03720.81
5.5.270.0200.06720.68
5.5.260.0130.08020.64
5.5.250.0000.04320.69
5.5.240.0230.07020.23
5.4.450.0130.07319.18
5.4.440.0170.03019.53
5.4.430.0000.04319.48
5.4.420.0130.06019.17
5.4.410.0030.04019.19
5.4.400.0130.04318.93
5.4.390.0130.07018.98
5.4.380.0100.06718.92
5.4.370.0130.03719.07
5.4.360.0030.04019.20
5.4.350.0030.07319.08
5.4.340.0070.05319.11
5.4.320.0070.05319.27
5.4.310.0070.06019.24
5.4.300.0070.06319.24
5.4.290.0100.05319.07
5.4.280.0030.06019.24
5.4.270.0000.08019.14
5.4.260.0170.04319.24
5.4.250.0100.05319.07
5.4.240.0070.07719.16
5.4.230.0100.07319.11
5.4.220.0070.05018.84
5.4.210.0070.03719.20
5.4.200.0130.07018.84
5.4.190.0030.04719.11
5.4.180.0000.08319.21
5.4.170.0100.03719.13
5.4.160.0070.05719.12
5.4.150.0030.07018.83
5.4.140.0070.07716.39
5.4.130.0000.05016.42
5.4.120.0070.07316.42
5.4.110.0000.04016.46
5.4.100.0070.06716.33
5.4.90.0000.05716.36
5.4.80.0070.06016.34
5.4.70.0130.05716.46
5.4.60.0100.04316.36
5.4.50.0000.04016.31
5.4.40.0070.07316.40
5.4.30.0100.04016.36
5.4.20.0130.06316.40
5.4.10.0030.06716.39
5.4.00.0130.06315.95
5.3.290.0130.07314.66
5.3.280.0100.04314.62
5.3.270.0130.05014.66
5.3.260.0130.07014.77
5.3.250.0030.07314.52
5.3.240.0030.07014.64
5.3.230.0170.07014.65
5.3.220.0100.07014.58
5.3.210.0030.04714.64
5.3.200.0100.05314.60
5.3.190.0070.04714.63
5.3.180.0100.05014.57
5.3.170.0100.06014.63
5.3.160.0100.04014.72
5.3.150.0100.06014.71
5.3.140.0070.03714.72
5.3.130.0130.04314.61
5.3.120.0130.06314.61
5.3.110.0070.07714.57
5.3.100.0100.04314.11
5.3.90.0000.05014.05
5.3.80.0070.03713.94
5.3.70.0070.07014.08
5.3.60.0200.06314.05
5.3.50.0100.07014.03
5.3.40.0070.07014.00
5.3.30.0100.05013.96
5.3.20.0100.06313.72
5.3.10.0030.05713.66
5.3.00.0030.06313.64
5.2.170.0070.03311.32
5.2.160.0100.05711.14
5.2.150.0100.05011.15
5.2.140.0070.06011.23
5.2.130.0100.06011.18
5.2.120.0000.05011.13
5.2.110.0070.06311.11
5.2.100.0030.06311.18
5.2.90.0070.06011.26
5.2.80.0000.03711.04
5.2.70.0000.03311.15
5.2.60.0070.06011.08
5.2.50.0070.04711.08
5.2.40.0030.03711.15
5.2.30.0070.05310.97
5.2.20.0030.05710.97
5.2.10.0100.05310.83
5.2.00.0000.06010.64
5.1.60.0000.0279.95
5.1.50.0030.0309.97
5.1.40.0030.0309.96
5.1.30.0070.02710.30
5.1.20.0000.03010.36
5.1.10.0030.03710.22
5.1.00.0100.02310.14
5.0.50.0000.0478.52
5.0.40.0030.0438.37
5.0.30.0100.0508.31
5.0.20.0030.0308.35
5.0.10.0030.0338.14
5.0.00.0070.0338.34
4.4.90.0000.0378.14
4.4.80.0070.0278.14
4.4.70.0000.0378.14
4.4.60.0000.0238.14
4.4.50.0000.0278.14
4.4.40.0000.0508.14
4.4.30.0030.0338.14
4.4.20.0030.0208.14
4.4.10.0000.0178.14
4.4.00.0000.0608.14
4.3.110.0000.0408.14
4.3.100.0070.0308.14
4.3.90.0000.0338.14
4.3.80.0000.0538.14
4.3.70.0030.0338.14
4.3.60.0030.0308.14
4.3.50.0030.0308.14
4.3.40.0000.0408.14
4.3.30.0000.0308.14
4.3.20.0030.0378.14
4.3.10.0030.0308.14
4.3.00.0000.0278.14

preferences:
39.86 ms | 401 KiB | 5 Q