3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyComment extends \DOMComment { } $dom = new DOMDocument(); $dom->registerNodeClass('DOMComment', 'MyComment'); var_dump($dom->createComment('Foo'));
Output for git.master, git.master_jit, rfc.property-hooks
object(MyComment)#2 (20) { ["data"]=> string(3) "Foo" ["length"]=> int(3) ["previousElementSibling"]=> NULL ["nextElementSibling"]=> NULL ["nodeName"]=> string(8) "#comment" ["nodeValue"]=> string(3) "Foo" ["nodeType"]=> int(8) ["parentNode"]=> NULL ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["nextSibling"]=> NULL ["attributes"]=> NULL ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> NULL ["textContent"]=> string(3) "Foo" }

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