3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_preporting(-1); class pupil { static function value($value) { return $value; } } $array = array(42, 3.14); var_dump(each($array)); //$first = reset(pupil::value($array)); var_dump(reset(pupil::value($array))); var_dump(each($array), each($array));

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0070.01016.58
7.3.00.0090.00016.17
7.2.130.0070.00716.39
7.2.120.0060.00916.63
7.2.110.0060.00616.55
7.2.100.0030.01016.53
7.2.90.0060.00916.87
7.2.80.0030.00816.65
7.2.70.0090.00616.77
7.2.60.0040.01116.74
7.2.50.0030.00816.79
7.2.40.0060.01016.57
7.2.30.0060.00916.39
7.2.20.0040.00816.67
7.2.10.0030.00916.74
7.2.00.0060.00617.87
7.1.250.0040.01415.65
7.1.200.0090.00315.63
7.1.100.0030.01318.14
7.1.70.0070.00316.73
7.1.60.0060.01919.46
7.1.50.0090.01216.80
7.1.00.0100.07022.30
7.0.200.0030.00616.63
7.0.140.0000.07721.95
7.0.60.0130.07320.04
7.0.50.0100.08017.88
7.0.40.0170.07720.13
7.0.30.0600.07020.08
7.0.20.0100.04720.27
7.0.10.0130.06320.26
7.0.00.0030.05320.23
5.6.280.0070.07020.91
5.6.210.0100.08320.75
5.6.200.0070.08318.21
5.6.190.0130.08020.45
5.6.180.3400.04020.33
5.6.170.0370.06320.55
5.6.160.0100.04020.71
5.6.150.0130.07018.19
5.6.140.0030.04018.19
5.6.130.0030.04318.21
5.6.120.0130.08021.12
5.6.110.0030.04021.04
5.6.100.0100.04721.00
5.6.90.0070.07721.00
5.6.80.0000.08020.49
5.5.350.0200.08320.38
5.5.340.0000.05318.07
5.5.330.0100.08320.44
5.5.320.0370.03320.35
5.5.310.0230.07020.29
5.5.300.0070.04317.98
5.5.290.0000.06317.93
5.5.280.0070.04320.89
5.5.270.0000.04320.76
5.5.260.0070.09020.73
5.5.250.0000.06720.55
5.5.240.2800.04020.17
5.4.450.0800.06319.58
5.4.440.1000.06319.63
5.4.430.0900.06319.16
5.4.420.0630.00019.50
5.4.410.0200.05018.72
5.4.400.0330.07018.91
5.4.390.0270.06018.78
5.4.380.0200.05318.50
5.4.370.0130.04318.48
5.4.360.0100.03718.55
5.4.350.0050.03512.02
5.4.340.0080.05412.02
5.4.320.0040.03712.50
5.4.310.0060.04212.50
5.4.300.0080.04112.50
5.4.290.0160.09012.48
5.4.280.0170.05412.38
5.4.270.0190.07512.38
5.4.260.0160.07812.38
5.4.250.0110.05412.38
5.4.240.0100.05812.38
5.4.230.0160.06412.37
5.4.220.0120.07212.37
5.4.210.0110.06012.37
5.4.200.0110.04712.38
5.4.190.0320.09612.37
5.4.180.0190.05412.37
5.4.170.0100.04512.38
5.4.160.0170.05812.38
5.4.150.0110.03712.38
5.4.140.0090.08312.06
5.4.130.0070.04012.04
5.4.120.0110.08012.00
5.4.110.0140.05012.00
5.4.100.0060.05512.00
5.4.90.0140.06812.00
5.4.80.0110.05211.99
5.4.70.0110.07011.99
5.4.60.0250.09411.99
5.4.50.0080.07511.99
5.4.40.0150.05611.98
5.4.30.0170.06811.98
5.4.20.0110.06411.98
5.4.10.0260.07511.98
5.4.00.0150.08511.47
5.3.290.0110.04912.80
5.3.280.0520.11412.71
5.3.270.0220.07412.72
5.3.260.0180.12812.72
5.3.250.0230.11512.72
5.3.240.0120.08312.72
5.3.230.0280.10612.71
5.3.220.0240.09012.68
5.3.210.0060.07412.68
5.3.200.0170.09812.68
5.3.190.0120.06112.67
5.3.180.0200.07612.67
5.3.170.0150.07012.67
5.3.160.0160.08512.67
5.3.150.0190.06412.68
5.3.140.0120.05512.66
5.3.130.0120.06012.66
5.3.120.0090.06412.66
5.3.110.0200.06912.66
5.3.100.0150.05912.12
5.3.90.0170.06312.10
5.3.80.0150.08012.09
5.3.70.0170.06812.09
5.3.60.0230.10412.08
5.3.50.0230.07612.03
5.3.40.0290.07612.03
5.3.30.0130.06011.98
5.3.20.0210.08611.77
5.3.10.0140.07211.73
5.3.00.0120.07511.72
5.2.170.0140.0389.22
5.2.160.0140.0429.22
5.2.150.0080.0609.23
5.2.140.0120.0519.22
5.2.130.0150.0639.18
5.2.120.0170.0599.18
5.2.110.0180.0699.18
5.2.100.0160.0679.18
5.2.90.0100.0559.18
5.2.80.0060.0379.18
5.2.70.0050.0449.17
5.2.60.0080.0319.13
5.2.50.0090.0309.10
5.2.40.0070.0329.07
5.2.30.0070.0429.05
5.2.20.0060.0449.04
5.2.10.0120.0418.94
5.2.00.0070.0418.81
5.1.60.0080.0378.09
5.1.50.0100.0328.09
5.1.40.0080.0418.07
5.1.30.0100.0408.42
5.1.20.0100.0358.44
5.1.10.0080.0298.17
5.1.00.0060.0538.17
5.0.50.0110.0246.64
5.0.40.0120.0466.50
5.0.30.0190.0546.32
5.0.20.0080.0346.30
5.0.10.0100.0316.28
5.0.00.0140.0536.27
4.4.90.0060.0254.78
4.4.80.0100.0314.76
4.4.70.0030.0304.75
4.4.60.0120.0484.76
4.4.50.0080.0324.77
4.4.40.0130.0594.71
4.4.30.0260.0604.76
4.4.20.0060.0214.84
4.4.10.0120.0544.85
4.4.00.0150.0454.76
4.3.110.0130.0364.67
4.3.100.0120.0204.66
4.3.90.0020.0174.64
4.3.80.0080.0314.58
4.3.70.0040.0244.63
4.3.60.0180.0284.63
4.3.50.0170.0394.63
4.3.40.0140.0494.54
4.3.30.0100.0383.30
4.3.20.0140.0373.28
4.3.10.0060.0363.23
4.3.00.0130.0236.64