3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument(); $element = $xml->createElement('saml:Assertion'); $xml_saml_assertion = $xml->appendChild($element); $attribute = $xml->createAttribute('id'); $attribute->value = 'IDCard'; $xml_saml_assertion->appendChild($attribute); $attribute = $xml->createAttribute('xmlns:saml'); $attribute->value = 'urn:oasis:names:tc:SAML:2.0:assertion'; $xml_saml_assertion->appendChild($attribute); $attribute = $xml->createAttribute('Version'); $attribute->value = '2.0'; $xml_saml_assertion->appendChild($attribute); var_dump($element->attributes[1]);
Output for git.master, git.master_jit, rfc.property-hooks
object(DOMAttr)#5 (21) { ["specified"]=> bool(true) ["schemaTypeInfo"]=> NULL ["name"]=> string(10) "xmlns:saml" ["value"]=> string(37) "urn:oasis:names:tc:SAML:2.0:assertion" ["ownerElement"]=> string(22) "(object value omitted)" ["nodeName"]=> string(10) "xmlns:saml" ["nodeValue"]=> string(37) "urn:oasis:names:tc:SAML:2.0:assertion" ["nodeType"]=> int(2) ["parentNode"]=> string(22) "(object value omitted)" ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> string(22) "(object value omitted)" ["lastChild"]=> string(22) "(object value omitted)" ["previousSibling"]=> string(22) "(object value omitted)" ["nextSibling"]=> string(22) "(object value omitted)" ["attributes"]=> NULL ["ownerDocument"]=> string(22) "(object value omitted)" ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> string(10) "xmlns:saml" ["baseURI"]=> NULL ["textContent"]=> string(37) "urn:oasis:names:tc:SAML:2.0:assertion" }

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:
30.49 ms | 409 KiB | 5 Q