3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = '"<?xml version="1.0" encoding="UTF-8"?><checkOrderResponse performedDatetime="2017-07-09T16:11:52+03:00" code="0" invoiceId="2000729266842" shopId="45951"/>"'; $data = new SimpleXMLElement($x); echo '<pre>'.$data->asXML().'</pre>';
Output for 7.0.0 - 7.3.0rc3
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/HDrMR on line 3 Warning: SimpleXMLElement::__construct(): "<?xml version="1.0" encoding="UTF-8"?><checkOrderResponse performedDatetime="20 in /in/HDrMR on line 3 Warning: SimpleXMLElement::__construct(): ^ in /in/HDrMR on line 3 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/HDrMR:3 Stack trace: #0 /in/HDrMR(3): SimpleXMLElement->__construct('"<?xml version=...') #1 {main} thrown in /in/HDrMR on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/HDrMR:-1 Stack trace: #0 /in/HDrMR(-1): SimpleXMLElement->__construct() #1 {main} Entity: line 1: parser error : Start tag expected, '<' not found "<?xml version="1.0" encoding="UTF-8"?><checkOrderResponse performedDatetime="20 ^
Process exited with code 255.
Output for hhvm-3.15.4 - 3.21.3
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/HDrMR:3 Stack trace: #0 /in/HDrMR(3): SimpleXMLElement->__construct() #1 {main} Entity: line 1: parser error : Start tag expected, '<' not found "<?xml version="1.0" encoding="UTF-8"?><checkOrderResponse performedDatetime="20 ^
Process exited with code 255.
Output for 5.6.30
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/HDrMR on line 3 Warning: SimpleXMLElement::__construct(): "<?xml version="1.0" encoding="UTF-8"?><checkOrderResponse performedDatetime="20 in /in/HDrMR on line 3 Warning: SimpleXMLElement::__construct(): ^ in /in/HDrMR on line 3 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /in/HDrMR:3 Stack trace: #0 /in/HDrMR(3): SimpleXMLElement->__construct('"<?xml version=...') #1 {main} thrown in /in/HDrMR on line 3
Process exited with code 255.