3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tri = [1, 1]; for ($x = 0; $x <= 6; ++$x) { var_export($tri); $trinew = [1]; for($y = 0, $count = count($tri); $y < $count; ++$y) { $z = $y + 1; $trinew[] = $tri[$y] + ($tri[$z] ?? 0); } $tri = $trinew; }

preferences:
32.65 ms | 404 KiB | 5 Q