3v4l.org

run code in 300+ PHP versions simultaneously
<?php function odd($limit){ $row=1; $current_number=1; while($current_number<=$limit){ for($i=1;$i<=$row;$i++){ echo $current_number." "; $current_number=$current_number+2;//incrementing numbers by 2 if you want to increment by 1 i.e print all numbers replace 2 by 1 } $row++; echo "\n";//for new line use <br/> } } odd(20); ?>
Output for git.master, git.master_jit, rfc.property-hooks
1 3 5 7 9 11 13 15 17 19

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:
48.42 ms | 401 KiB | 8 Q