3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Item { public static $c = 0; public $i; public function __construct() { $this->i = self::$c; self::$c += 1; } } $collection = new \SplDoublyLinkedList(); $collection->add(0, new Item()); $collection->add(1, new Item()); foreach ($collection as $i=>$item) { echo $i . ' ' . $item->i . "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
0 0 1 1

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