3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 12.for_loops_fib.php $fib = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]; $size = sizeof($fib); for($i = 0; $i < $size; $i++) { print $fib[$i].PHP_EOL; } // We can also create this same series using simple math. $a = 1; $b = 2; print $a.PHP_EOL; print $b.PHP_EOL; for($i = 0; $i < $size-2; $i++) { $newB = $a+$b; $a = $b; $b = $newB; print $newB.PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
1 2 3 5 8 13 21 34 55 89 1 2 3 5 8 13 21 34 55 89

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
26.58 ms | 405 KiB | 5 Q