3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $number = 28; $columnCount = 4; for($i = 1, $loopCounter = 1; $i <= $number; $i = $i + $columnCount, $loopCounter++) { $range = range($i, $i+$columnCount - 1); if($loopCounter % 2 === 0) { $range = array_reverse($range); } foreach($range as $n) { echo str_pad($n, 2, ' ', STR_PAD_LEFT) . " "; } echo "\n"; }

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.20.3450.01014.74
7.3.10.1800.00714.78
7.3.00.2130.00414.73
7.2.150.1900.00915.00
7.2.140.2090.01014.95
7.2.130.2030.01214.95
7.2.120.1710.01014.99
7.2.110.1770.00914.94
7.2.100.1670.00915.06
7.2.90.1680.01015.13
7.2.80.0490.00715.07
7.2.70.0430.00714.86
7.2.60.0480.00814.95
7.2.50.1570.00815.00
7.2.40.1590.00715.02
7.2.30.1520.00915.07
7.2.20.1500.01014.79
7.2.10.1620.00414.92
7.2.00.1530.00415.02
7.1.250.2000.00213.67
7.1.240.0780.00614.00
7.1.230.0180.00413.97
7.1.220.0800.00314.11
7.1.210.0540.01313.43
7.1.200.0610.00313.21
7.1.190.0150.00613.47
7.1.180.0200.00313.32
7.1.170.0650.00313.60
7.1.160.0690.00313.51
7.1.150.0670.00313.42
7.1.140.0710.00313.28
7.1.130.0730.01013.25
7.1.120.0530.00713.45
7.1.110.0540.00713.35
7.1.100.0660.00713.42
7.1.90.0520.00313.74
7.1.80.0710.01313.32
7.1.70.0470.01213.55
7.1.60.0570.01013.82
7.1.50.0570.00313.67
7.1.40.0530.00913.93
7.1.30.0490.01013.13
7.1.20.0530.00713.46
7.1.10.0220.00413.71
7.1.00.0610.01313.72
7.0.330.0830.01013.66
7.0.320.0240.01013.47
7.0.310.0840.01013.57
7.0.300.0630.00713.37
7.0.290.0880.01213.75
7.0.280.0570.00313.75
7.0.270.0750.00613.53
7.0.260.0540.00313.67
7.0.250.0650.00313.67
7.0.240.0620.01013.48
7.0.230.0530.00313.75
7.0.220.0840.01713.63
7.0.210.0430.00313.67
7.0.200.0470.00313.52
7.0.190.0660.01013.58
7.0.180.0730.01013.33
7.0.170.0530.01213.20
7.0.160.0520.01013.23
7.0.150.0440.00613.34
7.0.140.0730.00913.29
7.0.130.0420.01013.30
7.0.120.0700.01013.57
7.0.110.0170.01113.25
7.0.100.0330.00713.18
7.0.90.0050.01013.30
7.0.80.0570.00013.29
7.0.70.0660.00712.97
7.0.60.0540.00013.15
7.0.50.0760.00013.21
7.0.40.0690.00713.35
7.0.30.0670.00313.25
7.0.20.0590.00713.28
7.0.10.0560.00313.23
7.0.00.0650.01313.48
hhvm-3.22.00.0780.16390.74
hhvm-3.21.30.0710.15389.87
hhvm-3.21.00.1210.18490.11
hhvm-3.20.20.1180.18490.43
hhvm-3.19.20.1120.17089.27
hhvm-3.18.50.0630.13388.53
hhvm-3.18.40.1390.17987.73
hhvm-3.17.30.0460.13187.34
hhvm-3.15.40.0590.16985.43
hhvm-3.13.20.1040.13796.64
hhvm-3.12.140.0720.12495.26
hhvm-3.11.10.0740.12787.50
hhvm-3.10.10.0750.11484.47
5.6.380.0150.01014.33
5.6.370.0060.01214.60
5.6.360.0190.00514.35
5.6.350.0110.00614.25
5.6.340.0220.00614.50
5.6.330.0160.01114.40
5.6.320.0200.00514.34
5.6.310.0110.01514.67
5.6.300.0070.00714.13
5.6.290.0070.00714.09
5.6.280.0070.00914.39
5.6.270.0040.02514.04
5.6.260.0080.00813.68
5.6.250.0110.01113.84
5.6.240.0100.01413.89
5.6.230.0070.00914.00
5.6.220.0130.01314.09
5.6.210.0150.00713.84
5.6.200.0080.01614.10
5.6.190.0140.00013.89
5.6.180.0050.01514.29
5.6.170.0050.00914.20
5.6.160.0070.01113.98
5.6.150.0000.01813.74
5.6.140.0170.01014.03
5.6.130.0230.00614.27
5.6.120.0060.00914.09
5.6.110.0130.00714.04
5.6.100.0060.00613.97
5.6.90.0030.01013.98
5.6.80.0090.00613.79
5.6.70.0060.00914.13
5.6.60.0090.00314.16
5.6.50.0090.00614.13
5.6.40.0040.01513.80
5.6.30.0120.00013.72
5.6.20.0140.01013.70
5.6.10.0180.00614.13
5.6.00.0180.00414.11
5.5.380.0030.00911.03
5.5.370.0110.00710.65
5.5.360.0100.00810.63
5.5.350.0090.00910.56
5.5.340.0060.00310.93
5.5.330.0090.00910.95
5.5.320.0110.00310.93
5.5.310.0090.00910.69
5.5.300.0110.00710.75
5.5.290.0080.00810.61
5.5.280.0090.00610.41
5.5.270.0000.01910.53
5.5.260.0060.00610.94
5.5.250.0080.00410.79
5.5.240.0080.00410.92
5.5.230.0170.00010.43
5.5.220.0060.00310.75
5.5.210.0110.00310.53
5.5.200.0070.00710.81
5.5.190.0040.01410.57
5.5.180.0130.00510.96
5.5.170.0090.00310.86
5.5.160.0140.00810.84
5.5.150.0070.00710.57
5.5.140.0090.00610.84
5.5.130.0190.00010.94
5.5.120.0080.00410.74
5.5.110.0050.00511.07
5.5.100.0070.01110.64
5.5.90.0030.01010.80
5.5.80.0220.00010.79
5.5.70.0040.01110.93
5.5.60.0000.01411.12
5.5.50.0090.00911.05
5.5.40.0130.00311.11
5.5.30.0170.00010.98
5.5.20.0070.00711.09
5.5.10.0070.00310.57
5.5.00.0110.00610.95
5.4.450.0050.00510.57
5.4.440.0080.01210.42
5.4.430.0100.00010.61
5.4.420.0060.00610.49
5.4.410.0060.00610.70
5.4.400.0150.00310.37
5.4.390.0050.00510.42
5.4.380.0050.00510.46
5.4.370.0070.01110.39
5.4.360.0000.00910.52
5.4.350.0090.00910.41
5.4.340.0110.00411.05
5.4.330.0060.01210.91
5.4.320.0090.00911.04
5.4.310.0090.01210.54
5.4.300.0090.00910.82
5.4.290.0150.00610.53
5.4.280.0120.00810.59
5.4.270.0130.00510.71
5.4.260.0000.01510.70
5.4.250.0040.01210.75
5.4.240.0040.00811.18
5.4.230.0120.00811.02
5.4.220.0050.01010.79
5.4.210.0150.00311.08
5.4.200.0070.01110.95
5.4.190.0070.00510.73
5.4.180.0080.00310.92
5.4.170.0090.00610.94
5.4.160.0090.00910.69
5.4.150.0040.01110.76
5.4.140.0040.00710.67
5.4.130.0120.00610.96
5.4.120.0060.00610.95
5.4.110.0040.00710.93
5.4.100.0050.00510.70
5.4.90.0080.00010.74
5.4.80.0070.01010.96
5.4.70.0080.00810.69
5.4.60.0000.01110.58
5.4.50.0030.00610.82
5.4.40.0110.00711.10
5.4.30.0110.00010.75
5.4.20.0030.00910.74
5.4.10.0120.00310.42
5.4.00.0070.00710.94
5.3.290.0110.00010.51
5.3.280.0070.00710.32
5.3.270.0030.01310.50
5.3.260.0070.00510.48
5.3.250.0040.00810.30
5.3.240.0100.00610.39
5.3.230.0070.00410.36
5.3.220.0070.00410.39
5.3.210.0110.00010.33
5.3.200.0040.00410.29
5.3.190.0040.01410.13
5.3.180.0120.00610.52
5.3.170.0040.00810.49
5.3.160.0090.00010.47
5.3.150.0110.00510.52
5.3.140.0090.00510.40
5.3.130.0120.00410.35
5.3.120.0050.00510.32
5.3.110.0030.01210.38
5.3.100.0030.01610.37
5.3.90.0080.00810.42
5.3.80.0040.00410.12
5.3.70.0060.00610.05
5.3.60.0100.00810.40
5.3.50.0070.00710.34
5.3.40.0120.00410.18
5.3.30.0100.00010.38
5.3.20.0040.00410.38
5.3.10.0020.00510.27
5.3.00.0030.00910.17
5.2.170.0130.0009.52
5.2.160.0000.0129.58
5.2.150.0110.0009.51
5.2.140.0030.0069.43
5.2.130.0030.0039.25
5.2.120.0070.0009.43
5.2.110.0080.0089.43
5.2.100.0030.0069.36
5.2.90.0050.0059.13
5.2.80.0040.0149.25
5.2.70.0050.0109.31
5.2.60.0060.0069.00
5.2.50.0120.0039.33
5.2.40.0070.0039.17
5.2.30.0110.0048.98
5.2.20.0090.0069.20
5.2.10.0090.0009.25
5.2.00.0030.0059.14
5.1.60.0070.0078.51
5.1.50.0060.0098.43
5.1.40.0000.0068.67
5.1.30.0040.0048.70
5.1.20.0000.0078.57
5.1.10.0070.0078.58
5.1.00.0090.0068.41
5.0.50.0070.0047.68
5.0.40.0090.0037.68
5.0.30.0110.0007.68
5.0.20.0090.0037.68
5.0.10.0000.0057.68
5.0.00.0030.0077.68
4.4.90.0000.0097.68
4.4.80.0000.0057.68
4.4.70.0030.0037.68
4.4.60.0060.0007.68
4.4.50.0030.0037.68
4.4.40.0000.0077.68
4.4.30.0000.0057.68
4.4.20.0070.0037.68
4.4.10.0000.0107.68
4.4.00.0090.0007.68
4.3.110.0040.0097.68
4.3.100.0070.0027.68
4.3.90.0040.0047.68
4.3.80.0060.0007.68
4.3.70.0000.0047.68
4.3.60.0000.0047.68
4.3.50.0000.0047.68
4.3.40.0040.0007.68
4.3.30.0000.0057.68
4.3.20.0030.0037.68
4.3.10.0050.0057.68
4.3.00.0000.0077.68