3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Examples of DoublyLinkedList */ $obj = new SplDoublyLinkedList(); // Check wither linked list is empty if ($obj->isEmpty()) { echo "Adding nodes to Linked List<br>\r\n"; $obj->push(2); $obj->push(3); echo "Adding the node at beginning of doubly linked list <br>\r\n"; $obj->unshift(10); } echo "<br>Our Linked List:"; print_r($obj); echo "<br>Pick the node from beginning of doubly linked list \r\n"; echo $obj->bottom();
Output for git.master, git.master_jit, rfc.property-hooks
Adding nodes to Linked List<br> Adding the node at beginning of doubly linked list <br> <br>Our Linked List:SplDoublyLinkedList Object ( [flags:SplDoublyLinkedList:private] => 0 [dllist:SplDoublyLinkedList:private] => Array ( [0] => 10 [1] => 2 [2] => 3 ) ) <br>Pick the node from beginning of doubly linked list 10

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:
38.67 ms | 402 KiB | 8 Q