3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument(); $root = $doc->appendChild($doc->createElement('root')); $root->setAttribute('xmlns:foo', 'uri:foo'); var_dump($root->hasAttribute('xmlns:foo'), $root->getAttribute('xmlns:foo')); foreach ($root->attributes as $k => $attribute) { var_dump($attribute->nodeName, $attribute->nodeValue); }
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) string(0) "" string(9) "xmlns:foo" string(7) "uri: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:
211.3 ms | 405 KiB | 5 Q