3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nums = \range(0, 25000); $starts = []; $ends = []; for ($i = 0; $i < 10; ++$i) { $starts[] = \microtime(true); $mout = \array_map(function ($item) { return (string)$item . 'm'; }, $nums); $ends[] = \microtime(true); } $total = 0; for ($i = 0; $i < 10; ++$i) { $total += $ends[$i] * 1000 - $starts[$i] * 1000; } \var_dump(\round($total / 10, 2));

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.50.0100.02918.19
7.3.40.0110.03318.22
7.3.30.0170.03218.26
7.3.20.0220.02719.18
7.3.10.0180.03119.11
7.3.00.0200.02819.26
7.2.180.0160.02818.54
7.2.170.0130.03518.48
7.2.160.0130.02818.51
7.2.150.0200.03119.36
7.2.140.0300.03219.56
7.2.130.0280.03219.54
7.2.120.0210.02819.56
7.2.110.0190.02919.55
7.2.100.0230.03219.52
7.2.90.0180.02919.53
7.2.80.0210.03019.47
7.2.70.0250.03119.43
7.2.60.0170.03319.47
7.2.50.0260.03319.50
7.2.40.0240.03319.54
7.2.30.0180.02919.50
7.2.20.0190.03519.55
7.2.10.0170.03319.45
7.2.00.0260.03419.56
7.1.280.0230.02618.36
7.1.270.0250.03118.40
7.1.260.0520.03018.33
7.1.250.0230.03118.46
7.1.240.0250.03618.02
7.1.230.0330.02418.22
7.1.220.0220.04317.94
7.1.210.0250.03318.29
7.1.200.0190.04818.07
7.1.190.0250.04217.98
7.1.180.0340.03118.20
7.1.170.0350.03818.10
7.1.160.0340.03117.73
7.1.150.0360.03018.27
7.1.140.0330.03018.06
7.1.130.0400.03018.17
7.1.120.0270.02718.09
7.1.110.0800.02318.18
7.1.100.0290.03018.14
7.1.90.0300.03418.39
7.1.80.0270.02718.27
7.1.70.0280.03218.29
7.1.60.0430.03018.26
7.1.50.0220.02518.37
7.1.40.0280.03518.36
7.1.30.0380.03118.29
7.1.20.0240.03118.35
7.1.10.0280.02818.39
7.1.00.0260.01918.68
7.0.330.0160.02617.81
7.0.320.0280.03117.76
7.0.310.0250.04117.82
7.0.300.1670.02417.67
7.0.290.0320.03517.85
7.0.280.0250.04017.66
7.0.270.0290.03617.86
7.0.260.0290.02917.62
7.0.250.0260.03217.66
7.0.240.0250.02917.98
7.0.230.0390.03718.13
7.0.220.0180.03617.91
7.0.210.0340.03118.04
7.0.200.0310.04618.08
7.0.190.0380.02518.05
7.0.180.0680.03718.04
7.0.170.0340.02717.07
7.0.160.0280.02317.70
7.0.150.0250.03217.96
7.0.140.0250.02518.04
7.0.130.0230.02718.15
7.0.120.0230.02917.93
7.0.110.0290.02017.73
7.0.100.0210.02717.86
7.0.90.0420.02717.83
7.0.80.0360.02718.07
7.0.70.0210.04818.08
7.0.60.0340.04017.82
7.0.50.0220.03118.21
7.0.40.0320.03618.09
7.0.30.0180.03618.00
7.0.20.0190.02918.02
7.0.10.2220.02618.06
7.0.00.0220.03118.09
hhvm-3.22.00.1140.23393.31
hhvm-3.21.30.1560.21293.46
hhvm-3.21.00.1200.25093.24
hhvm-3.20.20.1360.24293.47
hhvm-3.19.20.1630.26591.83
hhvm-3.18.50.1160.26091.05
hhvm-3.18.40.1340.24190.59
hhvm-3.17.30.1390.23690.30
hhvm-3.15.40.1410.20088.24
hhvm-3.13.20.1600.18699.24
hhvm-3.12.140.1740.27098.16
hhvm-3.11.10.1380.31690.36
hhvm-3.10.10.1360.18186.70
5.6.400.0230.12929.40
5.6.390.0270.10028.89
5.6.380.0260.17429.00
5.6.370.0290.15429.37
5.6.360.0230.12229.09
5.6.350.0370.13129.35
5.6.340.0350.13429.11
5.6.330.0450.10029.54
5.6.320.0400.10629.41
5.6.310.0260.16629.71
5.6.300.0300.10828.95
5.6.290.0280.11029.56
5.6.280.0490.10229.57
5.6.270.0330.14029.28
5.6.260.0290.10529.48
5.6.250.0320.11129.46
5.6.240.0190.15229.35
5.6.230.0340.11129.61
5.6.220.0370.15629.46
5.6.210.0420.10629.33
5.6.200.0360.10929.55
5.6.190.0380.10629.29
5.6.180.0350.10629.43
5.6.170.0330.11929.47
5.6.160.0350.12429.49
5.6.150.0270.11529.31
5.6.140.0370.11729.34
5.6.130.0450.15629.26
5.6.120.0340.10529.70
5.6.110.0370.10229.23
5.6.100.0400.10729.29
5.6.90.0270.10829.34
5.6.80.0260.10229.37
5.6.70.0370.09529.11
5.6.60.0310.11829.20
5.6.50.0340.11229.14
5.6.40.0370.09829.22
5.6.30.0230.10729.55
5.6.20.0250.11329.30
5.6.10.0140.13329.34
5.6.00.0290.11729.24
5.5.380.0340.14029.07
5.5.370.0340.12429.51
5.5.360.0450.14829.29
5.5.350.0430.10329.11
5.5.340.0170.11629.17
5.5.330.0270.11829.37
5.5.320.0360.14629.36
5.5.310.0280.11629.53
5.5.300.0220.11529.11
5.5.290.0230.12129.07
5.5.280.0360.08929.39
5.5.270.0250.11829.05
5.5.260.0460.10429.28
5.5.250.0270.09529.12
5.5.240.0250.15429.45
5.5.230.0330.10529.14
5.5.220.0390.09629.16
5.5.210.0320.09229.53
5.5.200.0320.12929.23
5.5.190.0410.09829.71
5.5.180.0240.12329.24
5.5.170.0100.11729.51
5.5.160.0440.09329.02
5.5.150.0270.11029.13
5.5.140.0240.14929.45
5.5.130.0200.12429.05
5.5.120.0380.11129.58
5.5.110.0350.10829.13
5.5.100.0270.13229.51
5.5.90.0320.10029.47
5.5.80.0360.11929.43
5.5.70.0200.15729.50
5.5.60.0280.11929.37
5.5.50.0220.12229.12
5.5.40.0260.11629.26
5.5.30.0260.15729.27
5.5.20.0230.11129.20
5.5.10.0310.14229.31
5.5.00.0340.12429.03
5.4.450.0400.10126.00
5.4.440.0410.08826.12
5.4.430.0240.11225.73
5.4.420.0200.11125.98
5.4.410.0150.10626.36
5.4.400.0410.10826.36
5.4.390.0290.09226.25
5.4.380.0290.09226.16
5.4.370.0300.08926.06
5.4.360.0260.09426.08
5.4.350.0190.10126.22
5.4.340.0380.14526.05
5.4.330.0360.10226.08
5.4.320.0300.09225.93
5.4.310.0420.09126.07
5.4.300.0240.13326.17
5.4.290.0170.11425.96
5.4.280.0300.10126.33
5.4.270.0250.11026.09
5.4.260.0270.11826.05
5.4.250.0310.10325.87
5.4.240.0280.12526.24
5.4.230.0330.10826.00
5.4.220.0420.10726.22
5.4.210.0230.15125.94
5.4.200.0130.15525.94
5.4.190.0300.09626.00
5.4.180.0230.10925.84
5.4.170.0280.10926.01
5.4.160.0270.11426.13
5.4.150.0100.10725.81
5.4.140.0290.10926.27
5.4.130.0260.10825.82
5.4.120.0290.11325.82
5.4.110.0300.08626.23
5.4.100.0270.11726.03
5.4.90.0370.10025.81
5.4.80.0290.09626.06
5.4.70.0370.09425.83
5.4.60.0290.10526.27
5.4.50.0290.09025.96
5.4.40.0280.12326.32
5.4.30.0360.09326.07
5.4.20.0350.10826.35
5.4.10.0400.10326.05
5.4.00.0270.10125.72
5.3.290.0100.00413.21
5.3.280.0090.00013.21
5.3.270.0150.00013.21
5.3.260.0080.01213.21
5.3.250.0100.01313.21
5.3.240.0190.00313.21
5.3.230.0060.00313.21
5.3.220.0140.00013.21
5.3.210.0070.00213.21
5.3.200.0160.00813.21
5.3.190.0070.01413.21
5.3.180.0150.00313.21
5.3.170.0110.00413.21
5.3.160.0110.00613.21
5.3.150.0110.00813.21
5.3.140.0080.01513.21
5.3.130.0150.00613.21
5.3.120.0090.00313.21
5.3.110.0090.00313.21
5.3.100.0090.00913.21
5.3.90.0050.00813.21
5.3.80.0140.00613.21
5.3.70.0110.00513.21
5.3.60.0070.00713.21
5.3.50.0110.00713.21
5.3.40.0160.00013.21
5.3.30.0100.00013.21
5.3.20.0040.00713.21
5.3.10.0060.00713.21
5.3.00.0060.00613.21
5.2.170.0140.00313.21
5.2.160.0080.00213.21
5.2.150.0130.00313.21
5.2.140.0050.00213.21
5.2.130.0060.00313.21
5.2.120.0120.00013.21
5.2.110.0100.00013.21
5.2.100.0060.00313.21
5.2.90.0100.00013.21
5.2.80.0060.01113.21
5.2.70.0060.00613.21
5.2.60.0080.00813.21
5.2.50.0110.00613.21
5.2.40.0120.00813.21
5.2.30.0100.00513.21
5.2.20.0050.00313.21
5.2.10.0040.00913.21
5.2.00.0070.00713.21
5.1.60.0060.00913.21
5.1.50.0080.00013.21
5.1.40.0070.00213.21
5.1.30.0040.00413.21
5.1.20.0050.00513.21
5.1.10.0050.00913.21
5.1.00.0100.00313.21
5.0.50.0120.00013.21
5.0.40.0040.00713.21
5.0.30.0070.00713.21
5.0.20.0090.00013.21
5.0.10.0030.00813.21
5.0.00.0060.00313.21
4.4.90.0000.00613.21
4.4.80.0080.00213.21
4.4.70.0040.00013.21
4.4.60.0000.00613.21
4.4.50.0110.00013.21
4.4.40.0080.00013.21
4.4.30.0050.00413.21
4.4.20.0000.00613.21
4.4.10.0120.00013.21
4.4.00.0020.00413.21
4.3.110.0070.00013.21
4.3.100.0000.00713.21
4.3.90.0070.00213.21
4.3.80.0110.00013.21
4.3.70.0080.00313.21
4.3.60.0030.00713.21
4.3.50.0080.00413.21
4.3.40.0070.00213.21
4.3.30.0060.00313.21
4.3.20.0030.00613.21
4.3.10.0040.00413.21
4.3.00.0030.00313.21