3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 1; $i < 10; $i++) { $functions[$i] = function ($a) use ($i) { return $a + $i; } } echo $functions[4](7);

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)
5.4.280.0030.03812.38
5.4.270.0070.04012.38
5.4.260.0050.04512.38
5.4.250.0060.04712.38
5.4.240.0060.03912.38
5.4.230.0050.03912.37
5.4.220.0040.03912.38
5.4.210.0100.03712.37
5.4.200.0110.07012.38
5.4.190.0160.07412.37
5.4.180.0090.06412.37
5.4.170.0090.07512.38
5.4.160.0100.05412.38
5.4.150.0070.05312.37
5.4.140.0070.05612.06
5.4.130.0060.05212.04
5.4.120.0060.05412.01
5.4.110.0100.05212.01
5.4.100.0080.04812.01
5.4.90.0090.06112.00
5.4.80.0070.05212.00
5.4.70.0080.04912.00
5.4.60.0060.05112.00
5.4.50.0060.05212.00
5.4.40.0120.04611.99
5.4.30.0120.04711.98
5.4.20.0100.05111.98
5.4.10.0090.05011.98
5.4.00.0060.05211.47
5.3.280.0080.05312.70
5.3.270.0100.05512.72
5.3.260.0050.06012.72
5.3.250.0120.05312.71
5.3.240.0080.05512.72
5.3.230.0090.05112.71
5.3.220.0110.05012.68
5.3.210.0070.05612.68
5.3.200.0110.05012.68
5.3.190.0090.05212.67
5.3.180.0120.04812.67
5.3.170.0130.04812.67
5.3.160.0110.05112.68
5.3.150.0070.05612.67
5.3.140.0110.05012.66
5.3.130.0080.05512.66
5.3.120.0100.05212.65
5.3.110.0130.04912.66
5.3.100.0100.04812.12
5.3.90.0090.05212.08
5.3.80.0080.04912.07
5.3.70.0100.04712.07
5.3.60.0140.04612.07
5.3.50.0110.04812.00
5.3.40.0090.05112.00
5.3.30.0140.04611.95
5.3.20.0050.05111.74
5.3.10.0090.04911.70
5.3.00.0120.04811.69
5.2.170.0070.0449.15
5.2.160.0080.0419.15
5.2.150.0030.0399.15
5.2.140.0040.0319.15
5.2.130.0030.0319.11
5.2.120.0040.0309.11
5.2.110.0010.0349.12
5.2.100.0030.0329.12
5.2.90.0080.0279.12
5.2.80.0060.0309.11
5.2.70.0060.0309.11
5.2.60.0060.0339.07
5.2.50.0080.0279.04
5.2.40.0060.0289.01
5.2.30.0050.0308.98
5.2.20.0040.0308.97
5.2.10.0040.0308.90
5.2.00.0050.0298.76
5.1.60.0030.0298.05
5.1.50.0030.0278.05
5.1.40.0070.0258.03
5.1.30.0060.0298.38
5.1.20.0070.0378.41
5.1.10.0060.0298.13
5.1.00.0060.0298.13
5.0.50.0040.0246.60
5.0.40.0070.0246.47
5.0.30.0040.0416.27
5.0.20.0060.0256.25
5.0.10.0050.0276.23
5.0.00.0060.0386.21
4.4.90.0040.0204.78
4.4.80.0020.0214.75
4.4.70.0050.0164.75
4.4.60.0010.0174.76
4.4.50.0060.0124.77
4.4.40.0040.0244.71
4.4.30.0040.0194.76
4.4.20.0050.0144.84
4.4.10.0030.0194.85
4.4.00.0010.0284.76
4.3.110.0040.0154.67
4.3.100.0060.0174.66
4.3.90.0050.0194.63
4.3.80.0030.0344.59
4.3.70.0050.0204.63
4.3.60.0040.0214.63
4.3.50.0060.0194.63
4.3.40.0040.0334.54
4.3.30.0050.0203.27
4.3.20.0050.0213.25
4.3.10.0090.0223.23
4.3.00.0300.01313.64

preferences:
142.73 ms | 1386 KiB | 7 Q