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 = 20000; $i <= $max; $i++) { if (sp($i) == $i) { echo $i."\n"; } }
based on 0kbJ7
Output for 5.4.5, 5.4.7, 5.4.38 - 5.4.39, 5.4.41 - 7.2.0
6 28 496 8128
Process exited with code 137.
Output for 5.3.12 - 5.4.4, 5.4.6, 5.4.8 - 5.4.37, 5.4.40
6 28 496
Process exited with code 137.