3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($v) { return $v + 1; } $foo = function ($v) { return $v + 1; }; $a = range(0,100000); $t = microtime(1); array_walk($a, 'foo'); $t = microtime(1) - $t; var_dump($t); $a = range(0,100000); $t = microtime(1); array_walk($a, $foo); $t = microtime(1) - $t; var_dump($t);

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.0030.02629.15
7.1.70.0090.02826.95
7.1.60.0130.03026.86
7.1.50.0070.04426.73
7.1.00.0100.09732.31
7.0.200.0830.01720.56
7.0.140.0030.08730.09
7.0.60.0000.05725.86
7.0.50.0100.09723.80
7.0.40.0130.09725.82
7.0.30.0530.07325.93
7.0.20.0500.08325.81
7.0.10.0170.09025.73
7.0.00.0130.09725.90
5.6.280.0130.14349.30
5.6.210.0130.14748.91
5.6.200.0100.08746.34
5.6.190.0100.16048.43
5.6.180.0330.14048.48
5.6.170.0600.12048.38
5.6.160.0170.11048.38
5.6.150.0370.12346.35
5.6.140.0030.09046.37
5.6.130.0070.09746.36
5.6.120.0270.09049.21
5.6.110.0100.12049.14
5.6.100.0200.13749.23
5.6.90.0200.10349.20
5.6.80.0200.14048.59
5.5.350.0070.07748.54
5.5.340.0230.13046.21
5.5.330.0130.09748.41
5.5.320.0300.08748.47
5.5.310.0230.09748.45
5.5.300.0170.09346.21
5.5.290.0130.10346.18
5.5.280.0270.10749.20
5.5.270.0270.13048.95
5.5.260.0200.14348.97
5.5.250.0070.13749.01
5.5.240.0370.10748.58
5.4.450.0570.11047.70
5.4.440.0400.11747.54
5.4.430.0130.11747.57
5.4.420.0370.11047.55
5.4.410.0330.08747.43
5.4.400.0270.11047.11
5.4.390.0500.10347.40
5.4.380.1130.20046.96
5.4.370.0830.13346.88
5.4.360.1070.12746.89
5.4.350.1000.13046.77
5.4.340.1070.18046.71
5.4.320.0140.09340.70
5.4.310.0160.09840.72
5.4.300.0200.09640.72
5.4.290.0080.09340.72
5.4.280.0140.08840.62
5.4.270.0150.09040.61
5.4.260.0110.09340.62
5.4.250.0150.09040.62
5.4.240.0140.08640.62
5.4.230.0140.09040.61
5.4.220.0120.08940.61
5.4.210.0130.09640.61
5.4.200.0210.10840.61
5.4.190.0120.08940.61
5.4.180.0140.09240.61
5.4.170.0150.09840.62
5.4.160.0160.09240.61
5.4.150.0120.08840.61
5.4.140.0170.09240.29
5.4.130.0100.09040.28
5.4.120.0190.11340.24
5.4.110.0130.09140.23
5.4.100.0120.08940.23
5.4.90.0130.08840.23
5.4.80.0120.09040.23
5.4.70.0130.08640.23
5.4.60.0200.08140.22
5.4.50.0100.09040.23
5.4.40.0100.09040.22
5.4.30.0160.08840.21
5.4.20.0140.08840.21
5.4.10.0120.09040.21
5.4.00.0120.08839.70
5.3.290.0170.08740.48
5.3.280.0190.09240.40
5.3.270.0130.09140.42
5.3.260.0140.09340.42
5.3.250.0150.09140.42
5.3.240.0170.08740.42
5.3.230.0110.08940.41
5.3.220.0080.09640.38
5.3.210.0140.10040.38
5.3.200.0100.09840.38
5.3.190.0170.09540.38
5.3.180.0070.09640.38
5.3.170.0160.08740.38
5.3.160.0150.10440.38
5.3.150.0150.10040.37
5.3.140.0160.08540.37
5.3.130.0180.09040.36
5.3.120.0140.10640.36
5.3.110.0180.09540.36
5.3.100.0150.08739.84
5.3.90.0150.09339.83
5.3.80.0110.09439.82
5.3.70.0130.09439.81
5.3.60.0100.09339.80
5.3.50.0120.09139.75
5.3.40.0170.11539.75
5.3.30.0180.09939.71
5.3.20.0130.08839.49
5.3.10.0140.08939.45
5.3.00.0130.09639.43
5.2.170.0060.0409.23
5.2.160.0070.0309.21
5.2.150.0050.0359.22
5.2.140.0100.0329.21
5.2.130.0080.0259.18
5.2.120.0080.0339.17
5.2.110.0040.0349.18
5.2.100.0050.0299.18
5.2.90.0030.0379.18
5.2.80.0030.0319.18
5.2.70.0040.0309.17
5.2.60.0020.0329.13
5.2.50.0020.0329.09
5.2.40.0060.0279.07
5.2.30.0070.0279.05
5.2.20.0070.0289.04
5.2.10.0090.0298.95
5.2.00.0030.0308.80
5.1.60.0030.0248.09
5.1.50.0070.0218.09
5.1.40.0030.0258.06
5.1.30.0040.0268.41
5.1.20.0060.0238.44
5.1.10.0100.0378.16
5.1.00.0050.0248.16
5.0.50.0060.0246.64
5.0.40.0030.0206.50
5.0.30.0030.0336.31
5.0.20.0050.0266.28
5.0.10.0030.0276.25
5.0.00.0040.0386.25
4.4.90.0030.0154.78
4.4.80.0040.0144.75
4.4.70.0040.0144.75
4.4.60.0020.0164.76
4.4.50.0010.0174.77
4.4.40.0040.0234.71
4.4.30.0010.0174.76
4.4.20.0030.0154.84
4.4.10.0030.0154.85
4.4.00.0020.0254.76
4.3.110.0030.0154.66
4.3.100.0020.0154.67
4.3.90.0020.0154.63
4.3.80.0040.0234.59
4.3.70.0030.0174.63
4.3.60.0070.0154.63
4.3.50.0020.0164.63
4.3.40.0040.0234.54
4.3.30.0040.0143.30
4.3.20.0010.0173.27
4.3.10.0000.0173.24
4.3.00.0030.01713.43

preferences:
30.08 ms | 401 KiB | 5 Q