3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dtd = "abc.DTD"; $root = 'LOAN_APPLICATION'; $imp = new DOMImplementation(); // create DTD $dtd = $imp->createDocumentType($root,null,"asdasdas.DTD"); // create document $dom = $imp->createDocument(null,$root,$dtd); $dom->formatOutput = true; $base = $dom->getElementsByTagName($root)->item(0); $base->setAttribute("MISMOVersionID", "2.4"); $DI = $dom->createElement("_DATA_INFORMATION"); $DVN = $dom->createElement("DATA_VERSION_Number='S4.2.02'"); $DI->appendChild($DVN); $base->appendChild($DI); /*// create extension $ext = $dom->createElement('EXTENSION_LOAN_APPLICATION'); $ext->setAttribute('FRELoanProspectorVersionIdentifier','4.0'); // create function request $fr = $dom->createElement('FUNCTION_REQUEST'); $fr->setAttribute('_Type','PollingRequest'); // create requesting party $frp = $dom->createElement('FRE_REQUESTING_PARTY'); $frp->setAttribute('SellerServicerNumber',"12345"); $frp->setAttribute('UserIdentifier',"adasdasd"); $frp->setAttribute('Password',"12315612"); // create polling status $ps = $dom->createElement('POLLING_STATUS'); $ps->setAttribute('LoanProspectorAsynchronousIdentifier',"123156465"); // build $ext->appendChild($fr); $ext->appendChild($frp); $ext->appendChild($ps); $base->appendChild($ext);*/ print $dom->saveXML();
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Deprecated: DOMImplementation::createDocumentType(): Passing null to parameter #2 ($publicId) of type string is deprecated in /in/O6Etk on line 8 Fatal error: Uncaught DOMException: Invalid Character Error in /in/O6Etk:20 Stack trace: #0 /in/O6Etk(20): DOMDocument->createElement('DATA_VERSION_Nu...') #1 {main} thrown in /in/O6Etk on line 20
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
Fatal error: Uncaught DOMException: Invalid Character Error in /in/O6Etk:20 Stack trace: #0 /in/O6Etk(20): DOMDocument->createElement('DATA_VERSION_Nu...') #1 {main} thrown in /in/O6Etk on line 20
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Uncaught exception 'DOMException' with message 'Invalid Character Error' in /in/O6Etk:20 Stack trace: #0 /in/O6Etk(20): DOMDocument->createElement('DATA_VERSION_Nu...') #1 {main} thrown in /in/O6Etk on line 20
Process exited with code 255.

preferences:
150.21 ms | 402 KiB | 198 Q