3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function arrayOfDivisors($x) { $divisors = array (); for($i = 1; $i < $x; $i ++) { if ($x % $i == 0) { if($i>$x/$i){break;} } } return [$i,$x/$i]; } var_dump (arrayOfDivisors ( 20 ));
based on 40Y2U
Output for 5.6.0 - 7.3.0alpha1
array(2) { [0]=> int(5) [1]=> int(4) }