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"; } }
Output for 5.3.18, 5.4.5 - 5.4.11, 5.4.14, 5.4.16, 5.4.19 - 5.4.21, 5.4.25, 5.4.27, 5.4.29 - 5.4.31, 5.4.41 - 7.2.0
6 28 496 8128
Process exited with code 137.
Output for 5.3.12 - 5.3.17, 5.3.19 - 5.4.4, 5.4.12 - 5.4.13, 5.4.15, 5.4.17 - 5.4.18, 5.4.22 - 5.4.24, 5.4.26, 5.4.28, 5.4.32 - 5.4.40
6 28 496
Process exited with code 137.