3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sxe = new SimpleXMLElement('<people xmlns:p="http://example.org/ns" xmlns:t="http://example.org/test"/>'); $xpath = new DOMXPath(($doc = dom_import_simplexml($sxe)->ownerDocument)); foreach($xpath->evaluate('/*/namespace::*') as $result) print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
DOMNameSpaceNode Object ( [nodeName] => xmlns:xml [nodeValue] => http://www.w3.org/XML/1998/namespace [nodeType] => 18 [prefix] => xml [localName] => xml [namespaceURI] => http://www.w3.org/XML/1998/namespace [ownerDocument] => (object value omitted) [parentNode] => (object value omitted) ) DOMNameSpaceNode Object ( [nodeName] => xmlns:t [nodeValue] => http://example.org/test [nodeType] => 18 [prefix] => t [localName] => t [namespaceURI] => http://example.org/test [ownerDocument] => (object value omitted) [parentNode] => (object value omitted) ) DOMNameSpaceNode Object ( [nodeName] => xmlns:p [nodeValue] => http://example.org/ns [nodeType] => 18 [prefix] => p [localName] => p [namespaceURI] => http://example.org/ns [ownerDocument] => (object value omitted) [parentNode] => (object value omitted) )

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:
43.29 ms | 403 KiB | 8 Q