3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dow = array("mon","tue","wed","thu","fri","sat","sun"); $pick_a_day = 2; // user input; NON zero based. monday = 1 $pic_a_day--; // make it zero based to use in code foreach($dow as $inc => $an_element ) { echo $dow[($pick_a_day+(count($dow))) % (count($dow))]." - loop number:".($inc+1)."\n"; $pick_a_day++; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $pic_a_day in /in/thvnT on line 7 wed - loop number:1 thu - loop number:2 fri - loop number:3 sat - loop number:4 sun - loop number:5 mon - loop number:6 tue - loop number:7

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.41 ms | 401 KiB | 8 Q