3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function sp($a) { $b = 1; $suma = 0; while ($b < $a) { if ($a % $b == 0) { $suma += $b; } $b += 1; } return $suma; } for ($i = 1, $max = 20; $i <= $max; $i++) { if (sp($i) == $i) { echo $i."\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.2.60.0000.01417.01
7.2.50.0030.00816.84
7.2.00.0030.01019.39
7.1.200.0090.00315.45
7.1.100.0070.00718.03
7.1.70.0000.01117.21
7.1.60.0160.01019.50
7.1.50.0040.01817.11
7.1.00.0030.07722.36
7.0.200.0100.01016.69
7.0.140.0070.05722.00
7.0.60.0170.05320.05
7.0.50.0000.05317.82
7.0.40.0000.09320.04
7.0.30.0330.07020.23
7.0.20.0270.06720.12
7.0.10.0200.09020.22
7.0.00.0070.05020.12
5.6.280.0000.07721.12
5.6.210.0100.06720.52
5.6.200.0030.04018.18
5.6.190.0030.06320.45
5.6.180.0200.04320.75
5.6.170.0430.07320.39
5.6.160.0070.05020.52
5.6.150.0030.06718.18
5.6.140.0100.03718.21
5.6.130.0030.06018.20
5.6.120.0130.04021.14
5.6.110.0200.08721.02
5.6.100.0070.03721.04
5.6.90.0030.06320.99
5.6.80.0030.05020.29
5.6.70.0270.06720.37
5.5.350.0100.07720.32
5.5.340.0100.06018.02
5.5.330.0100.05020.19
5.5.320.0100.06020.19
5.5.310.0270.07720.27
5.5.300.0030.08017.95
5.5.290.0200.04318.02
5.5.280.0100.07320.98
5.5.270.0070.04020.79
5.5.260.0200.07720.76
5.5.250.0000.07320.46
5.5.240.0070.05320.29
5.4.450.0830.06319.20
5.4.440.0730.07719.61
5.4.430.1030.05719.58
5.4.420.0030.06319.58
5.4.410.1130.05319.06
5.4.400.0300.04718.81
5.4.390.0270.04718.84
5.4.380.0230.06018.76
5.4.370.0270.05318.61
5.4.360.0270.07018.63
5.4.350.0130.08718.78
5.4.340.0230.06318.55
5.4.320.0500.06318.74
5.4.310.0200.08318.57
5.4.300.0170.08318.84
5.4.290.0270.06318.74
5.4.280.0230.06018.64
5.4.270.0230.07318.72
5.4.260.0170.05718.82
5.4.250.0100.07018.46
5.4.240.0270.05318.57
5.4.230.0270.05318.74
5.4.220.0130.08318.72
5.4.210.0230.06318.75
5.4.200.0170.06016.80
5.4.190.0370.05018.70
5.4.180.0270.05318.72
5.4.170.0370.06018.74
5.4.160.0370.05318.81
5.4.150.0230.05718.59
5.4.140.0330.06016.45
5.4.130.0130.08716.45
5.4.120.0270.06316.28
5.4.110.0230.05716.29
5.4.100.0070.07016.26
5.4.90.0230.05316.31
5.4.80.0230.07016.31
5.4.70.0230.07716.30
5.4.60.0200.07316.25
5.4.50.0130.08316.23
5.4.40.0200.08016.26
5.4.30.0170.07716.39
5.4.20.0230.07716.22
5.4.10.0230.07016.22
5.4.00.0130.08015.73
5.3.290.0200.08314.82
5.3.280.0230.05714.62
5.3.270.0230.08014.59
5.3.260.0270.07714.74
5.3.250.0230.07714.61
5.3.240.0330.05714.76
5.3.230.0170.07314.66
5.3.220.0370.06314.59
5.3.210.0230.07714.78
5.3.200.0170.08014.60
5.3.190.0270.07014.66
5.3.180.0200.06014.61
5.3.170.0270.07014.54
5.3.160.0170.06314.66
5.3.150.0270.06714.54
5.3.140.0330.06314.53
5.3.130.0230.07014.54
5.3.120.0330.06714.54
5.3.110.0200.08014.67
5.3.100.0300.05014.04
5.3.90.0100.06314.08
5.3.80.0200.06014.12
5.3.70.0230.05314.01
5.3.60.0130.05714.02
5.3.50.0070.07013.96
5.3.40.0270.04714.04
5.3.30.0200.06313.95
5.3.20.0200.05313.66
5.3.10.0200.05013.82
5.3.00.0270.04313.70
5.2.170.0130.04711.21
5.2.160.0170.04011.24
5.2.150.0130.04711.36
5.2.140.0200.04011.16
5.2.130.0130.04711.14
5.2.120.0030.05311.17
5.2.110.0100.04711.12
5.2.100.0230.05311.30
5.2.90.0130.06311.11
5.2.80.0170.06011.21
5.2.70.0170.04711.19
5.2.60.0330.04311.06
5.2.50.0130.04311.23
5.2.40.0100.04711.06
5.2.30.0100.05311.06
5.2.20.0270.04710.95
5.2.10.0200.03310.90
5.2.00.0170.04010.80
5.1.60.0230.03310.05
5.1.50.0170.03310.06
5.1.40.0170.03710.04
5.1.30.0200.04310.38
5.1.20.0200.04710.39
5.1.10.0230.04010.25
5.1.00.0130.05010.17
5.0.50.0030.0378.75
5.0.40.0130.0278.52
5.0.30.0100.0438.34
5.0.20.0030.0438.28
5.0.10.0170.0338.17
5.0.00.0130.0508.35
4.4.90.0130.0277.19
4.4.80.0100.0277.19
4.4.70.0070.0307.19
4.4.60.0100.0277.19
4.4.50.0030.0337.19
4.4.40.0030.0507.19
4.4.30.0100.0277.19
4.4.20.0100.0307.19
4.4.10.0100.0307.19
4.4.00.0100.0407.19
4.3.110.0100.0277.19
4.3.100.0070.0337.19
4.3.90.0100.0277.19
4.3.80.0070.0377.19
4.3.70.0070.0277.19
4.3.60.0170.0237.19
4.3.50.0070.0237.19
4.3.40.0130.0307.19
4.3.30.0030.0237.19
4.3.20.0070.0207.19
4.3.10.0000.0337.19
4.3.00.0170.0276.84