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"; } }
Output for 4.3.0 - 7.2.0
6