3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Request {//TODO testing code REMOVE //class Request extends \Connection\OTA\Request { /** * @param \Car\CarSearchParams $parameters */ public function build () {//TODO testing code REMOVE // public function build (\Car\CarSearchParams $parameters) { $dom = new DOMDocument('1.0', 'utf-8'); $rootNode = $dom->createElement('OTA_VehAvailRateRQ'); $rootNode->setAttribute('PrimaryLangID', 'EN'); $rootNode->setAttribute('TimeStamp', 'EN'); $rootNode->setAttribute('Target', 'EN'); $rootNode->setAttribute('Version', 'EN'); $rootNode->setAttribute('TransactionIdentifier', 'EN'); $rootNode->setAttribute('SequenceNmbr', 'EN'); $rootNode->setAttribute('MaxResponses', 'EN'); $this->setAttr($rootNode, array("neeeeeeeeeeeew", "coooool")); // $POSNode = $dom->createElement('POS'); $dom->appendChild($rootNode); return $dom->saveXML(); } protected function setAttr ($node, $attrs){ foreach ($attrs as $key=>$value){ $node->setAttribute($key, $value); } } } //TODO testing code REMOVE $obj = new Request(); echo $obj->build();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught DOMException: Invalid Character Error in /in/a0t5d:31 Stack trace: #0 /in/a0t5d(31): DOMElement->setAttribute('0', 'neeeeeeeeeeeew') #1 /in/a0t5d(20): Request->setAttr(Object(DOMElement), Array) #2 /in/a0t5d(39): Request->build() #3 {main} thrown in /in/a0t5d on line 31
Process exited with code 255.

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:
59.2 ms | 401 KiB | 8 Q