3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $i = 0; // menghitung loop $j = 0; // key untuk $data $contoh = range(0, 11); $temp = []; $data = []; foreach($contoh as $c) { $temp[$i] = $c; $i++; if( ($i % 3) == 0) { $data[] = $temp[$i]; } } print_r($temp); print_r($data);
based on cVMOa

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.0120.00716.21
7.3.00.0130.00816.40
7.2.130.0130.00616.74
7.2.120.0140.00716.35
7.2.110.0170.00516.61
7.2.100.0130.00816.37
7.2.90.0100.01116.71
7.2.80.0180.00616.51
7.2.70.0150.01116.78
7.2.60.0090.00816.83
7.2.50.0090.01416.62
7.2.40.0130.01116.59
7.2.30.0170.00716.35
7.2.20.0150.00316.41
7.2.10.0130.00816.47
7.2.00.0100.00717.70
7.1.250.0100.00815.47
7.1.200.0100.00515.61
7.1.100.0070.00718.31
7.1.70.0080.00017.12
7.1.60.0100.01319.50
7.1.50.0000.01017.02
7.1.00.0130.06722.45
7.0.200.0030.00914.98
7.0.140.0030.06322.04
7.0.60.0070.07020.07
7.0.50.0070.07017.87
7.0.40.0070.09320.23
7.0.30.0500.07320.19
7.0.20.0330.08020.10
7.0.10.0070.08320.08
7.0.00.0200.06020.06
5.6.280.0000.07321.12
5.6.210.0030.04020.54
5.6.200.0000.04318.16
5.6.190.0170.04020.41
5.6.180.0300.04320.47
5.6.170.0330.07320.71
5.6.160.0070.08320.57
5.6.150.0030.08318.18
5.6.140.0130.07318.17
5.6.130.0070.06718.14
5.6.120.0000.04321.00
5.6.110.0070.06321.14
5.6.100.0070.08020.98
5.6.90.0070.08321.01
5.6.80.0200.07020.52
5.6.70.4400.04020.26
5.5.350.0070.05720.37
5.5.340.0070.05318.00
5.5.330.0130.03020.42
5.5.320.0030.07320.33
5.5.310.0370.08020.26
5.5.300.0100.04017.91
5.5.290.0130.06018.03
5.5.280.0130.06720.87
5.5.270.0070.06320.88
5.5.260.0270.06720.95
5.5.250.0070.03720.66
5.5.240.0130.03720.23
5.4.450.0800.06019.20
5.4.440.0830.06719.15
5.4.430.0970.06019.52
5.4.420.0170.05019.57
5.4.410.0130.05319.07
5.4.400.0170.06018.75
5.4.390.0170.05718.46
5.4.380.0230.05318.75
5.4.370.0270.05718.69
5.4.360.0370.05018.59
5.4.350.0170.06718.84
5.4.340.0200.06018.49
5.4.320.0230.05018.62
5.4.310.0330.04718.63
5.4.300.0200.05718.80
5.4.290.0300.04718.80
5.4.280.0170.05718.83
5.4.270.0200.06018.83
5.4.260.0230.06018.73
5.4.250.0270.04718.76
5.4.240.0430.05718.55
5.4.230.0170.06018.45
5.4.220.0270.04718.45
5.4.210.1030.04018.61
5.4.200.0530.05716.69
5.4.190.0370.04018.73
5.4.180.0170.06718.74
5.4.170.0270.05018.67
5.4.160.0670.05318.78
5.4.150.0870.05318.72
5.4.140.0100.05716.19
5.4.130.0170.04716.32
5.4.120.0300.04016.17
5.4.110.1070.04716.28
5.4.100.0170.05716.22
5.4.90.0230.04716.28
5.4.80.1130.04316.27
5.4.70.0270.04316.26
5.4.60.0300.04716.41
5.4.50.0330.03716.26
5.4.40.0130.06016.23
5.4.30.0530.05316.25
5.4.20.1230.04316.22
5.4.10.0130.05716.25
5.4.00.0170.05715.77
5.3.290.0070.06714.67
5.3.280.0970.06014.65
5.3.270.0130.07014.54
5.3.260.0300.05014.64
5.3.250.0230.05014.60
5.3.240.0130.06014.55
5.3.230.0270.06714.52
5.3.220.0170.05314.51
5.3.210.1100.05714.55
5.3.200.0270.06714.56
5.3.190.0100.06314.60
5.3.180.0170.05314.48
5.3.170.0300.04314.46
5.3.160.0230.06314.46
5.3.150.0270.04714.56
5.3.140.0300.04314.45
5.3.130.0300.04714.55
5.3.120.0170.05714.52
5.3.110.0330.04014.44
5.3.100.0170.05714.16
5.3.90.0230.05013.93
5.3.80.0100.06313.93
5.3.70.0230.04714.07
5.3.60.1030.06014.00
5.3.50.0200.05013.92
5.3.40.1070.06714.06
5.3.30.0170.04713.98
5.3.20.0270.04013.67
5.3.10.1030.05313.73
5.3.00.0170.06313.63
5.2.170.0230.05311.15
5.2.160.0800.05311.29
5.2.150.0330.04711.18
5.2.140.1270.06011.12
5.2.130.0170.04311.14
5.2.120.0130.04711.01
5.2.110.0730.04711.23
5.2.100.0070.04711.14
5.2.90.0300.03011.02
5.2.80.0270.04011.04
5.2.70.0230.05011.23
5.2.60.0300.04311.00
5.2.50.0270.04711.07
5.2.40.0170.04011.00
5.2.30.0230.03710.94
5.2.20.0130.05011.10
5.2.10.0200.04010.95
5.2.00.0200.04010.69
5.1.60.0200.03010.12
5.1.50.0130.03710.03
5.1.40.0230.03010.07
5.1.30.0130.03710.45
5.1.20.0100.04010.32
5.1.10.0230.02710.16
5.1.00.0100.04010.18
5.0.50.0070.0308.61
5.0.40.0100.0338.50
5.0.30.0030.0478.29
5.0.20.0100.0278.31
5.0.10.0100.0238.24
5.0.00.0700.0408.21
4.4.90.0070.0205.89
4.4.80.0100.0175.86
4.4.70.0100.0175.83
4.4.60.0070.0205.87
4.4.50.0030.0235.97
4.4.40.0070.0335.86
4.4.30.0100.0205.91
4.4.20.0100.0205.92
4.4.10.0070.0235.93
4.4.00.0130.0275.92
4.3.110.0100.0175.75
4.3.100.0730.0235.81
4.3.90.0100.0175.79
4.3.80.0070.0375.87
4.3.70.0070.0235.79
4.3.60.0130.0175.88
4.3.50.0130.0175.79
4.3.40.0130.0275.84
4.3.30.0030.0304.77
4.3.20.0070.0274.77
4.3.10.0030.0304.77
4.3.00.0000.0236.97