3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<'XML' <root attribute="42"></root> XML; $dom = new DOMDocument(); $dom->preserveWhiteSpace = FALSE; $dom->loadXml($xml); $objects = [ $dom, $dom->documentElement, $dom->documentElement->attributes->getNamedItem('attribute'), $dom->createTextNode(''), $dom->createComment(''), $dom->createCDATASection(''), $dom->createProcessingInstruction('pi', ''), $dom->createDocumentFragment(), new DOMXPath($dom) ]; foreach ($objects as $object) { echo get_class($object), ': ', method_exists($object, '__get') ? 'true' : 'false', "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
DOMDocument: false DOMElement: false DOMAttr: false DOMText: false DOMComment: false DOMCdataSection: false DOMProcessingInstruction: false DOMDocumentFragment: false DOMXPath: false

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