3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test() { static $i; if (!isset($i)) $i = 3; if ($i <= 0) return; return array('id' => $i--, 'someValue' => mt_rand()); } $rappels = array(); $i = 0; while($row = test()) { foreach($row as $key=>$val) { $rappels[$i][$key] = $val; } $i++; } var_dump($rappels);

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.2.00.0030.01019.20
7.1.70.0050.00317.07
7.1.60.0100.00319.46
7.1.50.0070.00716.86
7.1.00.0000.07722.47
7.0.200.0320.00414.51
7.0.140.0000.07722.16
7.0.60.0030.08719.96
7.0.50.0100.08017.79
7.0.40.0100.04020.40
7.0.30.0270.06020.07
7.0.20.0230.03320.16
7.0.10.0170.07720.24
7.0.00.0070.08720.08
5.6.280.0000.07320.78
5.6.210.0000.08720.57
5.6.200.0170.07718.19
5.6.190.0070.05320.61
5.6.180.0530.04720.39
5.6.170.0230.07720.44
5.6.160.0130.07320.49
5.6.150.0100.04318.15
5.6.140.0030.04018.18
5.6.130.0130.06318.16
5.6.120.0130.04721.10
5.6.110.0100.06021.03
5.6.100.0130.08020.97
5.6.90.0100.07321.14
5.6.80.0130.07320.59
5.5.350.3800.04320.43
5.5.340.0030.04318.05
5.5.330.0070.08320.38
5.5.320.0230.04320.31
5.5.310.0270.08020.36
5.5.300.0100.07718.14
5.5.290.0000.09317.95
5.5.280.0070.05320.87
5.5.270.0130.06720.88
5.5.260.0100.07720.79
5.5.250.0070.08320.79
5.5.240.0030.07720.23
5.4.450.0770.05319.60
5.4.440.0800.06019.57
5.4.430.0100.06319.70
5.4.420.0670.05019.38
5.4.410.0670.04719.21
5.4.400.0100.05019.02
5.4.390.0370.06319.12
5.4.380.0430.05318.79
5.4.370.0300.06318.69
5.4.360.0370.04718.56
5.4.350.0400.05718.79
5.4.340.0230.06018.61
5.4.320.0080.04112.50
5.4.310.0030.04112.50
5.4.300.0060.04412.50
5.4.290.0040.04312.48
5.4.280.0110.03312.38
5.4.270.0110.03312.39
5.4.260.0080.03712.39
5.4.250.0020.04412.38
5.4.240.0120.03112.39
5.4.230.0050.03912.38
5.4.220.0100.04312.37
5.4.210.0080.03512.37
5.4.200.0070.03812.38
5.4.190.0090.05012.37
5.4.180.0070.05112.38
5.4.170.0080.04912.38
5.4.160.0100.04612.38
5.4.150.0070.04912.37
5.4.140.0090.05112.06
5.4.130.0150.05812.04
5.4.120.0150.05312.00
5.4.110.0050.04111.99
5.4.100.0130.04212.00
5.4.90.0070.05112.00
5.4.80.0100.04811.99
5.4.70.0080.04611.99
5.4.60.0060.04711.99
5.4.50.0080.04811.99
5.4.40.0090.04611.98
5.4.30.0070.04911.98
5.4.20.0110.05111.97
5.4.10.0090.05411.98
5.4.00.0080.05411.47
5.3.290.0090.03912.80
5.3.280.0100.04912.71
5.3.270.0110.05312.73
5.3.260.0090.04912.72
5.3.250.0070.04312.71
5.3.240.0090.05212.72
5.3.230.0120.04812.71
5.3.220.0100.04612.68
5.3.210.0060.05512.68
5.3.200.0090.04912.68
5.3.190.0100.04912.68
5.3.180.0100.04812.68
5.3.170.0070.05012.67
5.3.160.0090.05012.68
5.3.150.0090.05312.68
5.3.140.0130.05212.66
5.3.130.0180.07812.66
5.3.120.0140.06012.66
5.3.110.0110.06112.66
5.3.100.0110.07212.12
5.3.90.0100.05512.10
5.3.80.0090.04612.09
5.3.70.0080.07012.09
5.3.60.0110.04512.08
5.3.50.0100.04712.03
5.3.40.0070.03612.02
5.3.30.0070.03511.98
5.3.20.0050.03611.77
5.3.10.0100.03211.73
5.3.00.0040.04411.71
5.2.170.0070.0289.22
5.2.160.0060.0289.22
5.2.150.0050.0319.22
5.2.140.0040.0459.21
5.2.130.0110.0369.18
5.2.120.0050.0429.18
5.2.110.0060.0419.19
5.2.100.0090.0379.18
5.2.90.0070.0419.18
5.2.80.0050.0499.18
5.2.70.0080.0469.18
5.2.60.0090.0449.13
5.2.50.0050.0479.10
5.2.40.0050.0299.08
5.2.30.0060.0319.05
5.2.20.0030.0319.03
5.2.10.0070.0328.94
5.2.00.0090.0278.81
5.1.60.0040.0258.09
5.1.50.0050.0258.09
5.1.40.0050.0258.06
5.1.30.0040.0278.41
5.1.20.0020.0368.44
5.1.10.0030.0288.16
5.1.00.0090.0228.16
5.0.50.0030.0226.64
5.0.40.0050.0266.50
5.0.30.0050.0376.31
5.0.20.0060.0176.28
5.0.10.0040.0206.26
5.0.00.0040.0316.25
4.4.90.0040.0224.77
4.4.80.0050.0214.75
4.4.70.0010.0244.75
4.4.60.0040.0184.75
4.4.50.0050.0124.77
4.4.40.0060.0224.71
4.4.30.0020.0164.76
4.4.20.0030.0164.84
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0020.0174.67
4.3.100.0030.0164.67
4.3.90.0000.0174.64
4.3.80.0040.0234.58
4.3.70.0010.0164.63
4.3.60.0030.0144.62
4.3.50.0030.0154.63
4.3.40.0030.0234.53
4.3.30.0020.0163.30
4.3.20.0010.0163.28
4.3.10.0020.0153.24
4.3.00.0330.03010.55