3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ll = new SplDoublyLinkedList(); $ll->push('one'); $ll->push('two'); $ll->push('three'); $ll->push('four'); $ll->rewind(); $iterations_done = iterator_apply($ll, function(Iterator $it) { echo $it->key(),"\t->", $it->current(),"\t->", ucfirst($it->current()),".\n"; $it->next(); return true; }, array($ll)); echo "Did iterate {$iterations_done} times \n";
Output for git.master, git.master_jit, rfc.property-hooks
0 ->one ->One. 1 ->two ->Two. 2 ->three ->Three. 3 ->four ->Four. Did iterate 4 times

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