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(TRUE) . "\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.0170.00316.88
8.3.50.0160.00418.10
8.3.40.0120.00918.84
8.3.30.0120.00618.88
8.3.20.0040.00418.95
8.3.10.0000.00820.51
8.3.00.0050.00319.38
8.2.180.0160.00616.75
8.2.170.0160.00322.96
8.2.160.0060.01320.70
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0030.00520.62
8.2.110.0070.00321.00
8.2.100.0130.00017.91
8.2.90.0040.00419.35
8.2.80.0050.00219.32
8.2.70.0050.00517.75
8.2.60.0090.00018.05
8.2.50.0060.00318.07
8.2.40.0080.00018.15
8.2.30.0090.00017.98
8.2.20.0060.00319.54
8.2.10.0000.00717.73
8.2.00.0040.00717.78
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0160.00622.59
8.1.230.0000.01120.89
8.1.220.0060.00317.74
8.1.210.0050.00518.87
8.1.200.0030.00617.47
8.1.190.0050.00217.63
8.1.180.0030.00518.10
8.1.170.0050.00320.56
8.1.160.0000.00718.89
8.1.150.0000.00818.54
8.1.140.0000.00717.25
8.1.130.0000.00717.81
8.1.120.0000.00717.39
8.1.110.0000.00817.37
8.1.100.0000.00717.30
8.1.90.0030.00517.42
8.1.80.0030.00417.46
8.1.70.0040.00417.41
8.1.60.0000.00817.52
8.1.50.0000.00717.37
8.1.40.0050.00217.56
8.1.30.0000.00717.66
8.1.20.0050.00317.52
8.1.10.0000.00817.59
8.1.00.0040.00417.47
8.0.300.0070.00019.86
8.0.290.0020.00516.88
8.0.280.0060.00318.32
8.0.270.0000.00717.25
8.0.260.0030.00316.87
8.0.250.0040.00416.98
8.0.240.0080.00017.07
8.0.230.0000.00717.11
8.0.220.0000.00816.82
8.0.210.0000.00816.87
8.0.200.0030.00316.89
8.0.190.0000.00716.86
8.0.180.0000.00716.86
8.0.170.0060.00316.75
8.0.160.0030.00316.89
8.0.150.0000.00816.92
8.0.140.0060.00316.79
8.0.130.0000.00513.28
8.0.120.0040.00416.88
8.0.110.0020.00516.92
8.0.100.0000.00716.75
8.0.90.0050.00316.71
8.0.80.0090.00616.77
8.0.70.0040.00416.84
8.0.60.0030.00516.69
8.0.50.0000.00816.94
8.0.30.0120.00616.84
8.0.20.0100.00917.00
8.0.10.0040.00416.95
8.0.00.0070.01116.58
7.4.330.0020.00212.94
7.4.320.0060.00016.53
7.4.300.0060.00016.55
7.4.290.0030.00316.55
7.4.280.0050.00316.36
7.4.270.0000.00716.61
7.4.260.0030.00313.20
7.4.250.0050.00316.40
7.4.240.0030.00316.43
7.4.230.0030.00316.38
7.4.220.0040.01516.44
7.4.210.0090.00616.60
7.4.200.0030.00316.39
7.4.190.0000.00716.45
7.4.160.0090.00616.49
7.4.150.0120.01216.80
7.4.140.0040.01416.52
7.4.130.0060.01116.44
7.4.120.0170.00016.52
7.4.110.0120.00616.45
7.4.100.0070.01016.48
7.4.90.0070.01316.40
7.4.80.0070.01419.39
7.4.70.0120.00616.59
7.4.60.0060.01116.57
7.4.50.0000.00616.25
7.4.40.0120.00616.48
7.4.30.0130.00316.57
7.4.00.0070.01114.90
7.3.330.0000.00613.34
7.3.320.0070.00013.29
7.3.310.0040.00416.18
7.3.300.0030.00616.27
7.3.290.0080.00816.33
7.3.280.0070.01216.36
7.3.270.0100.00716.35
7.3.260.0110.00616.58
7.3.250.0070.01016.40
7.3.240.0080.00816.49
7.3.230.0140.00316.21
7.3.210.0100.01316.46
7.3.200.0030.02016.56
7.3.190.0060.01116.42
7.3.180.0030.01616.53
7.3.170.0060.00916.64
7.3.160.0130.00616.55
7.3.120.0030.01314.74
7.2.330.0090.00916.63
7.2.320.0060.01216.78
7.2.310.0060.01216.48
7.2.300.0100.00716.48
7.2.290.0130.01216.66
7.2.60.0140.00016.46
7.2.00.0000.01519.36
7.1.200.0060.00315.58
7.1.100.0030.01018.18
7.1.70.0040.01217.18
7.1.60.0140.01119.31
7.1.50.0070.01416.87
7.1.00.0070.03022.47
7.0.200.0210.00314.76
7.0.140.0070.07022.10
7.0.120.0000.05022.04
7.0.60.0130.07320.08
7.0.50.0100.07717.87
7.0.40.0070.04020.02
7.0.30.0030.04020.14
7.0.20.0000.04720.20
7.0.10.0000.05720.26
7.0.00.0030.04720.23
5.6.280.0070.07021.02
5.6.210.0100.08020.73
5.6.200.0130.06718.19
5.6.190.0030.04020.48
5.6.180.0000.04720.61
5.6.170.0070.03720.48
5.6.160.0000.04020.50
5.6.150.0070.03720.40
5.6.140.0030.04020.44
5.6.130.0000.04020.23
5.6.120.0030.03720.52
5.6.110.0000.04320.51
5.6.100.0000.06020.22
5.6.90.0070.03720.35
5.6.80.0030.03719.79
5.6.70.0000.04019.79
5.6.60.0030.06319.81
5.6.50.0070.04319.56
5.6.40.0030.04019.60
5.6.30.0030.08319.55
5.6.20.0000.06719.70
5.6.10.0030.08719.53
5.6.00.0000.06019.54
5.5.350.0370.07720.30
5.5.340.0070.05717.98
5.5.330.0000.04320.35
5.5.320.0000.04320.27
5.5.310.0000.04020.19
5.5.300.0130.03720.23
5.5.290.0030.04019.98
5.5.280.0030.04020.13
5.5.270.0000.04020.12
5.5.260.0030.04020.13
5.5.250.0000.04319.85
5.5.240.0000.04019.36
5.5.230.0000.05019.31
5.5.220.0000.04319.59
5.5.210.0030.04319.59
5.5.200.0030.04719.39
5.5.190.0070.07719.56
5.5.180.0330.06019.65
5.5.160.0100.06719.55
5.5.150.0030.08019.40
5.5.140.0070.06019.32
5.5.130.0070.04319.32
5.5.120.0030.04719.56
5.5.110.0030.07719.47
5.5.100.0030.06319.38
5.5.90.0100.07719.42
5.5.80.0070.07319.37
5.5.70.0070.07719.23
5.5.60.0070.07019.41
5.5.50.0030.07019.56
5.5.40.0030.08319.42
5.5.30.0070.06719.46
5.5.20.0130.05019.30
5.5.10.0030.07719.28
5.5.00.0030.07319.45
5.4.450.0000.04019.34
5.4.440.0000.04019.43
5.4.430.0070.03319.57
5.4.420.0000.04319.47
5.4.410.0030.04019.20
5.4.400.0030.03319.16
5.4.390.0000.04019.21
5.4.380.0070.03019.25
5.4.370.0000.04018.93
5.4.360.0070.05318.86
5.4.350.0100.07318.88
5.4.340.0000.08019.00
5.4.320.0030.06718.87
5.4.310.0070.06319.15
5.4.300.0030.08019.23
5.4.290.0070.07318.88
5.4.280.0030.05018.98
5.4.270.0070.04018.92
5.4.260.0070.06018.85
5.4.250.0070.05019.14
5.4.240.0070.05719.00
5.4.230.0000.05319.14
5.4.220.0070.07319.14
5.4.210.0070.05319.24
5.4.200.0100.07319.15
5.4.190.0030.07019.14
5.4.180.0070.05018.99
5.4.170.0100.07319.24
5.4.160.0030.07319.13
5.4.150.0100.06718.84
5.4.140.0070.07316.55
5.4.130.0000.05716.35
5.4.120.0030.05316.54
5.4.110.0070.07316.59
5.4.100.0030.07316.55
5.4.90.0070.07016.47
5.4.80.0100.07016.46
5.4.70.0070.06016.71
5.4.60.0000.06016.65
5.4.50.0000.06716.63
5.4.40.0070.06716.63
5.4.30.0030.05316.27
5.4.20.0070.03716.50
5.4.10.0070.07016.26
5.4.00.0030.05015.94
5.3.290.0170.07714.66
5.3.280.0100.07314.74
5.3.270.0000.05014.65
5.3.260.0070.08314.61
5.3.250.0030.07314.65
5.3.240.0030.04714.68
5.3.230.0000.06014.67
5.3.220.0000.08014.62
5.3.210.0030.08014.73
5.3.200.0030.07314.58
5.3.190.0030.05314.50
5.3.180.0200.06014.60
5.3.170.0000.04014.58
5.3.160.0030.08314.58
5.3.150.0030.06014.71
5.3.140.0030.07714.57
5.3.130.0070.05014.61
5.3.120.0030.06014.55
5.3.110.0030.06014.61
5.3.100.0000.04713.95
5.3.90.0030.05714.08
5.3.80.0000.05714.10
5.3.70.0030.07713.91
5.3.60.0030.07314.00
5.3.50.0030.05313.98
5.3.40.0000.07313.96
5.3.30.0030.07013.99
5.3.20.0000.04713.84
5.3.10.0030.06713.84
5.3.00.0030.07313.84
5.2.170.0000.06313.84
5.2.160.0030.06713.84
5.2.150.0070.06013.84
5.2.140.0070.06313.84
5.2.130.0030.05713.84
5.2.120.0030.05713.84
5.2.110.0000.05713.84
5.2.100.0030.06013.84
5.2.90.0000.05713.84
5.2.80.0000.05013.84
5.2.70.0000.03013.84
5.2.60.0000.05713.84
5.2.50.0000.05713.84
5.2.40.0030.06313.84
5.2.30.0030.06013.84
5.2.20.0000.03713.84
5.2.10.0000.05013.84
5.2.00.0000.05013.84
5.1.60.0030.05313.84
5.1.50.0070.05013.84
5.1.40.0000.03713.84
5.1.30.0030.05313.84
5.1.20.0000.04313.84
5.1.10.0000.04313.84
5.1.00.0070.05013.84
5.0.50.0030.04713.84
5.0.40.0070.04313.84
5.0.30.0000.06013.84
5.0.20.0000.04013.84
5.0.10.0000.04713.84
5.0.00.0070.06313.84
4.4.90.0000.01713.84
4.4.80.0000.03013.84
4.4.70.0070.03013.84
4.4.60.0070.03313.84
4.4.50.0030.02713.84
4.4.40.0000.05713.84
4.4.30.0000.03713.84
4.4.20.0000.02713.84
4.4.10.0000.03713.84
4.4.00.0070.03313.84
4.3.110.0130.02713.84
4.3.100.0000.03313.84
4.3.90.0000.02313.84
4.3.80.0070.05013.84
4.3.70.0000.03313.84
4.3.60.0000.03313.84
4.3.50.0070.03313.84
4.3.40.0000.05713.84
4.3.30.0000.02013.84
4.3.20.0000.03713.84
4.3.10.0000.02013.84
4.3.00.0030.03313.84

preferences:
47.8 ms | 401 KiB | 5 Q