3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_rows = array(); for($i = 1; $i <= 28; $i++) { if(in_array($i, array(1,2))) { $_rows['row1'][] = 'Category '.$i; } if(in_array($i, array(3,4,5))) { $_rows['row2'][] = 'Category '.$i; } if(in_array($i, array(6,7,8))) { $_rows['row3'][] = 'Category '.$i; } if(in_array($i, array(9,10,11))) { $_rows['row4'][] = 'Category '.$i; } if(in_array($i, array(12,13))) { $_rows['row5'][] = 'Category '.$i; } if(in_array($i, array(14,15,16))) { $_rows['row6'][] = 'Category '.$i; } if(in_array($i, array(17,18,19))) { $_rows['row7'][] = 'Category '.$i; } if(in_array($i, array(20,21,22))) { $_rows['row8'][] = 'Category '.$i; } if(in_array($i, array(23,24,25))) { $_rows['row9'][] = 'Category '.$i; } if(in_array($i, array(26,27,28))) { $_rows['row10'][] = 'Category '.$i; } } foreach($_rows as $_row):?> <ul> <?php foreach($_row as $_sub_category): $i++; ?> <li <?php if($i==1) { echo 'class="first"'; } ?>><?php echo $_sub_category; ?></li> <?php endforeach; ?> </ul> <?php endforeach; ?>

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.0rc40.0150.00498.97
7.3.0rc30.0070.01116.40
7.2.00.0030.01019.32
7.1.100.0170.00718.00
7.1.70.0060.00617.09
7.1.60.0070.01419.40
7.1.50.0030.01917.00
7.1.00.0000.04722.37
7.0.200.0170.00014.85
7.0.140.0030.07322.12
7.0.120.0000.07022.03
7.0.60.0030.08019.94
7.0.50.0070.07317.92
7.0.40.0330.07720.04
7.0.30.0300.07720.20
7.0.20.0300.06320.14
7.0.10.0270.08020.04
7.0.00.0230.07020.23
5.6.210.0070.06020.50
5.6.200.0100.04718.19
5.6.190.0270.07720.41
5.6.180.0200.05720.63
5.6.170.0270.08320.56
5.6.160.0230.07720.41
5.6.150.0200.06320.43
5.6.140.0270.08720.33
5.6.130.0170.06020.33
5.6.120.0200.04020.40
5.6.110.0300.07320.10
5.6.100.0170.06320.12
5.6.90.0300.08020.09
5.6.80.0270.07319.86
5.6.70.0230.05319.78
5.6.60.0200.06719.70
5.6.50.0270.05719.50
5.6.40.0170.04719.70
5.6.30.0300.08019.53
5.6.20.0300.07719.67
5.6.10.0270.05319.48
5.6.00.0400.06019.48
5.5.350.0330.07720.29
5.5.340.0170.07017.98
5.5.330.0200.08020.08
5.5.320.0300.06320.38
5.5.310.0270.06720.13
5.5.300.0200.07320.23
5.5.290.0230.06020.24
5.5.280.0270.07720.15
5.5.270.0230.06320.12
5.5.260.0230.06720.14
5.5.250.0200.07019.71
5.5.240.0400.06319.63
5.5.230.0270.06719.52
5.5.220.0170.05719.36
5.5.210.0330.07319.50
5.5.200.0300.07719.50
5.5.190.0300.07319.56
5.5.180.0300.05319.50
5.5.160.0300.07319.34
5.5.150.0230.06719.32
5.5.140.0330.07719.52
5.5.130.0230.03719.42
5.5.120.0230.06019.44
5.5.110.0270.06719.52
5.5.100.0270.07019.33
5.5.90.0300.06719.38
5.5.80.0300.06319.46
5.5.70.0270.03719.36
5.5.60.0270.03719.21
5.5.50.0270.07019.45
5.5.40.0230.08019.46
5.5.30.0230.03319.46
5.5.20.0270.07319.46
5.5.10.0170.08019.14
5.5.00.0230.08319.34
5.4.450.0430.07019.47
5.4.440.0230.08019.41
5.4.430.0200.05719.41
5.4.420.0300.06019.50
5.4.410.0200.05719.29
5.4.400.0070.06319.09
5.4.390.0200.05318.91
5.4.380.0230.04719.18
5.4.370.0300.04719.09
5.4.360.0330.06719.19
5.4.350.0200.07318.81
5.4.340.0330.06319.18
5.4.320.0230.08019.08
5.4.310.0230.05019.11
5.4.300.0230.07019.11
5.4.290.0070.06019.20
5.4.280.0330.06319.14
5.4.270.0230.07018.92
5.4.260.0300.06719.15
5.4.250.0230.05718.80
5.4.240.0270.06019.14
5.4.230.0270.04019.15
5.4.220.0200.07318.91
5.4.210.0270.03718.80
5.4.200.0300.07718.79
5.4.190.0270.07019.08
5.4.180.0230.07018.99
5.4.170.0370.06019.14
5.4.160.0430.06019.12
5.4.150.0330.06019.09
5.4.140.0130.06016.48
5.4.130.0230.06716.30
5.4.120.0170.05016.25
5.4.110.0130.05016.39
5.4.100.0200.05016.42
5.4.90.0130.05316.36
5.4.80.0170.04016.24
5.4.70.0300.06316.25
5.4.60.0270.06316.23
5.4.50.0200.04316.32
5.4.40.0200.07016.24
5.4.30.0200.04316.39
5.4.20.0230.07316.14
5.4.10.0230.05716.30
5.4.00.0200.06315.79
5.3.290.0270.06714.62
5.3.280.0230.07014.55
5.3.270.0230.05314.59
5.3.260.0300.05314.41
5.3.250.0300.06714.55
5.3.240.0200.03714.55
5.3.230.0230.05014.55
5.3.220.0230.04714.43
5.3.210.0170.07714.53
5.3.200.0200.03714.68
5.3.190.0230.05314.47
5.3.180.0300.06714.52
5.3.170.0230.03714.50
5.3.160.0130.06014.67
5.3.150.0200.04014.51
5.3.140.0230.06014.50
5.3.130.0170.04014.50
5.3.120.0200.03314.54
5.3.110.0270.06014.36
5.3.100.0230.07313.88
5.3.90.0270.06314.05
5.3.80.0100.05014.05
5.3.70.0400.04713.99
5.3.60.0130.04713.95
5.3.50.0300.06013.93
5.3.40.0200.05013.98
5.3.30.0200.05313.88
5.3.20.0200.03713.55
5.3.10.0170.04013.51
5.3.00.0200.03013.62
5.2.170.0170.03712.42
5.2.160.0100.03312.42
5.2.150.0200.03012.42
5.2.140.0200.03012.42
5.2.130.0200.03312.42
5.2.120.0130.03012.42
5.2.110.0100.03012.42
5.2.100.0130.02712.42
5.2.90.0070.03312.42
5.2.80.0130.02712.42
5.2.70.0100.03712.42
5.2.60.0070.03312.42
5.2.50.0130.02712.45
5.2.40.0070.03012.45
5.2.30.0070.03012.45
5.2.20.0030.03312.45
5.2.10.0030.03712.45
5.2.00.0070.03012.45
5.1.60.0100.04312.45
5.1.50.0070.02312.45
5.1.40.0070.02712.45
5.1.30.0070.03312.45
5.1.20.0100.02312.45
5.1.10.0070.03012.45
5.1.00.0170.04712.45
5.0.50.0000.02312.45
5.0.40.0030.02012.45
5.0.30.0030.03012.45
5.0.20.0030.02012.45
5.0.10.0070.01712.45
5.0.00.0000.03312.45
4.4.90.0030.01712.42
4.4.80.0070.01312.45
4.4.70.0030.01712.45
4.4.60.0070.01312.45
4.4.50.0030.01712.45
4.4.40.0030.02312.45
4.4.30.0030.01712.45
4.4.20.0070.01712.45
4.4.10.0070.01312.45
4.4.00.0030.02312.45
4.3.110.0030.02012.45
4.3.100.0030.01712.45
4.3.90.0070.01312.45
4.3.80.0030.02312.45
4.3.70.0000.02012.45
4.3.60.0030.01712.45
4.3.50.0030.01712.45
4.3.40.0170.01312.45
4.3.30.0000.01712.45
4.3.20.0000.02012.45
4.3.10.0030.01712.45
4.3.00.0000.01712.45