3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $foo = 'bar'; } $bar = function() { $foo = 'bar'; }; $tries = 1E5; $start = microtime(true); for ($i = 0; $i < $tries; $i++) { foo(); } echo (microtime(true) - $start)."\n"; $start = microtime(true); for ($i = 0; $i < $tries; $i++) { $bar(); } echo (microtime(true) - $start);

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)
7.2.00.0070.01419.39
7.1.70.0030.01317.30
7.1.60.0100.02719.32
7.1.50.0210.02834.69
7.1.00.0070.03722.36
7.0.200.0000.01516.82
7.0.140.0100.07722.18
7.0.60.0130.08719.92
7.0.50.0100.05717.86
7.0.40.0100.07320.12
7.0.30.0270.08720.16
7.0.20.0270.08320.12
7.0.10.0270.08720.19
7.0.00.0000.05020.22
5.6.280.0000.10720.89
5.6.210.0130.10320.48
5.6.200.0070.11718.13
5.6.190.0030.06020.41
5.6.180.0300.10020.55
5.6.170.0270.12020.59
5.6.160.0000.13020.76
5.6.150.0070.08018.19
5.6.140.0130.06018.24
5.6.130.0100.12018.13
5.6.120.0070.12021.02
5.6.110.0070.12721.14
5.6.100.0130.11721.14
5.6.90.0070.11021.04
5.6.80.0170.11720.52
5.6.70.0330.10020.53
5.5.350.0070.10720.33
5.5.340.0100.11717.96
5.5.330.0000.07320.27
5.5.320.0170.09020.31
5.5.310.0330.10720.34
5.5.300.0000.09018.04
5.5.290.0070.12317.95
5.5.280.0100.11020.67
5.5.270.0000.07720.65
5.5.260.0100.10020.80
5.5.250.0100.11320.67
5.5.240.0070.12320.35
5.4.450.2370.05019.49
5.4.440.2200.06319.41
5.4.430.2200.06319.40
5.4.420.2200.05319.40
5.4.410.2230.05019.35
5.4.400.2100.05319.02
5.4.390.2270.08019.20
5.4.380.2270.05719.20
5.4.370.2270.05319.17
5.4.360.2330.06319.22
5.4.350.2300.05318.99
5.4.340.2070.06718.95
5.4.320.2400.05319.04
5.4.310.1900.06019.25
5.4.300.2000.05018.96
5.4.290.2230.06319.00
5.4.280.2270.06018.87
5.4.270.2300.06019.24
5.4.260.2100.05718.98
5.4.250.2230.05319.15
5.4.240.2100.04719.30
5.4.230.2200.07019.08
5.4.220.2100.05319.08
5.4.210.2100.05319.05
5.4.200.2000.05719.21
5.4.190.2030.05018.86
5.4.180.2030.05318.83
5.4.170.2130.06718.83
5.4.160.2070.05018.96
5.4.150.2030.05318.96
5.4.140.0870.05316.38
5.4.130.0030.05716.29
5.4.120.0000.05316.39
5.4.110.0000.05316.53
5.4.100.2500.06716.25
5.4.90.2100.05016.53
5.4.80.2070.05316.44
5.4.70.2330.05716.52
5.4.60.2370.05316.43
5.4.50.2000.05016.55
5.4.40.2330.05016.30
5.4.30.2270.05316.48
5.4.20.2330.07016.52
5.4.10.2300.05716.33
5.4.00.2030.05715.94
5.3.290.2300.06014.58
5.3.280.2370.05714.71
5.3.270.2230.06714.69
5.3.260.2170.07314.63
5.3.250.2230.06714.68
5.3.240.2300.05314.69
5.3.230.2270.06314.61
5.3.220.2130.06714.56
5.3.210.2330.06014.49
5.3.200.2130.07314.55
5.3.190.1930.06714.63
5.3.180.2270.05714.48
5.3.170.2370.05314.63
5.3.160.2300.06014.49
5.3.150.2270.06314.48
5.3.140.2030.05714.57
5.3.130.2100.05714.45
5.3.120.0030.08014.63
5.3.110.0070.07714.64
5.3.100.0070.10714.11
5.3.90.1500.06713.93
5.3.80.2300.06714.04
5.3.70.2270.06313.93
5.3.60.2370.05713.93
5.3.50.2370.08013.86
5.3.40.1970.06313.92
5.3.30.2500.07713.83
5.3.20.2330.06013.92
5.3.10.2030.06013.57
5.3.00.2130.05013.57
5.2.170.1830.02011.26
5.2.160.1800.03011.08
5.2.150.1700.03311.23
5.2.140.1700.03011.07
5.2.130.1770.03011.18
5.2.120.1730.02311.01
5.2.110.2030.03311.07
5.2.100.1770.03311.05
5.2.90.1870.03711.13
5.2.80.1730.02311.32
5.2.70.1800.02711.02
5.2.60.1770.02711.05
5.2.50.1600.03010.92
5.2.40.1500.02310.96
5.2.30.1430.02710.87
5.2.20.1430.03010.82
5.2.10.1430.02710.76
5.2.00.1430.02710.86
5.1.60.1470.0279.92
5.1.50.1570.0179.93
5.1.40.1400.02710.05
5.1.30.1400.02310.41
5.1.20.1330.02310.32
5.1.10.1230.0239.96
5.1.00.1270.0239.95
5.0.50.0600.0208.43
5.0.40.0100.0108.31
5.0.30.0000.0308.20
5.0.20.0000.0208.08
5.0.10.0000.0238.14
5.0.00.0000.0308.23
4.4.90.0000.0177.79
4.4.80.0000.0137.79
4.4.70.0000.0177.79
4.4.60.0000.0207.79
4.4.50.0000.0177.79
4.4.40.0330.0237.79
4.4.30.0570.0177.79
4.4.20.0800.0177.79
4.4.10.0430.0137.79
4.4.00.0530.0237.79
4.3.110.0530.0137.79
4.3.100.0500.0177.79
4.3.90.0670.0177.79
4.3.80.0670.0277.79
4.3.70.0670.0177.79
4.3.60.0730.0237.79
4.3.50.0730.0137.79
4.3.40.0700.0237.79
4.3.30.0230.0137.79
4.3.20.0370.0177.79
4.3.10.0370.0207.79
4.3.00.0400.0177.79

preferences:
35 ms | 401 KiB | 5 Q