3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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"); $DVN->setAttribute("_Number", "S4.2.02"); $DI->appendChild($DVN); $base->appendChild($DI); //Additional Case Data $ACD = $dom->createElement("ADDITIONAL_CASE_DATA"); //TRANSMITTAL_DATA $TD = $createElement("TRANSMITTAL_DATA"); $TD->setAttributes("CaseStateType", "UnderWriting"); $TD->setAttributes("LenderBranchIdentifier", "0001"); $TD->setAttributes("LenderRegistrationIdentifier", ""); $TD->setAttributes("PropertyAppraisedValueAmount", "565000.00"); $TD->setAttributes("PropertyEstimatedValueAmount", "565000.00"); $ACD->appendChild($TD); $base->appendChild($ACD); /*// 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();
based on ZpjW7
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: createElement in /in/JB18v on line 33 Fatal error: Uncaught Error: Function name must be a string in /in/JB18v:33 Stack trace: #0 {main} thrown in /in/JB18v on line 33
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Notice: Undefined variable: createElement in /in/JB18v on line 33 Fatal error: Function name must be a string in /in/JB18v on line 33
Process exited with code 255.