3v4l.org

run code in 300+ PHP versions simultaneously
<?php $q = new SplDoublyLinkedList; $q->push('A'); $q->push('B'); $q->push('C'); $q->push('D'); $q->push('E'); $prev = null; $q->rewind(); while ($q->valid()) { $current = $q->current(); echo 'PREV: ', $prev, PHP_EOL; echo 'CURRENT: ', $current, PHP_EOL; $prev = $current; $q->next(); $next = $q->current(); echo 'NEXT: ', $next, PHP_EOL; echo PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
PREV: CURRENT: A NEXT: B PREV: A CURRENT: B NEXT: C PREV: B CURRENT: C NEXT: D PREV: C CURRENT: D NEXT: E PREV: D CURRENT: E NEXT:

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