fibonacci using reduce
<?php $array = []; $n = 80000; for($i=1; $i <= $n; $i++){ $array[] = $i; } print_r(array_reduce($array, function($res, $number){ $rest = $number + $res; echo $rest . " - "; return $rest; }));