3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument; $dom->loadXML('<foo>foo1<x/></foo>'); $nodes = $dom->documentElement->childNodes; $iter = $nodes->getIterator(); $clone = clone $iter; var_dump($iter->current()); var_dump($clone->current()); $iter->next(); var_dump($iter->current()); var_dump($clone->current());
Output for git.master, git.master_jit, rfc.property-hooks
object(DOMText)#5 (23) { ["wholeText"]=> string(4) "foo1" ["data"]=> string(4) "foo1" ["length"]=> int(4) ["previousElementSibling"]=> NULL ["nextElementSibling"]=> string(22) "(object value omitted)" ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(4) "foo1" ["nodeType"]=> int(3) ["parentNode"]=> string(22) "(object value omitted)" ["parentElement"]=> string(22) "(object value omitted)" ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["nextSibling"]=> string(22) "(object value omitted)" ["attributes"]=> NULL ["isConnected"]=> bool(true) ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> string(1) "/" ["textContent"]=> string(4) "foo1" }
Process exited with code 139.

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:
36.12 ms | 407 KiB | 5 Q