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(''), $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
Fatal error: Uncaught DOMException: Invalid Character Error in /in/BlcTu:18 Stack trace: #0 /in/BlcTu(18): DOMDocument->createProcessingInstruction('') #1 {main} thrown in /in/BlcTu on line 18
Process exited with code 255.

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