3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument(); $element = $xml->createElementNS('urn:oasis:names:tc:SAML:2.0:assertion', '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); echo $xml->saveXML(), PHP_EOL; echo $xml->C14N(), PHP_EOL; $xml->loadXML($xml->saveXML()); echo $xml->C14N(), PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
<?xml version="1.0"?> <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" id="IDCard" Version="2.0"/> <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Version="2.0" id="IDCard"></saml:Assertion> <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Version="2.0" id="IDCard"></saml: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:
135.8 ms | 406 KiB | 5 Q