3v4l.org

run code in 300+ PHP versions simultaneously
<?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(stripslashes($x)); echo '<pre>'.$data->asXML().'</pre>';
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/NOZaD on line 3 Warning: SimpleXMLElement::__construct(): "<?xml version="1.0" encoding="UTF-8"?><checkOrderResponse performedDatetime="20 in /in/NOZaD on line 3 Warning: SimpleXMLElement::__construct(): ^ in /in/NOZaD on line 3 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/NOZaD:3 Stack trace: #0 /in/NOZaD(3): SimpleXMLElement->__construct('"<?xml version=...') #1 {main} thrown in /in/NOZaD on line 3
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/NOZaD on line 3 Warning: SimpleXMLElement::__construct(): "<?xml version="1.0" encoding="UTF-8"?><checkOrderResponse performedDatetime="20 in /in/NOZaD on line 3 Warning: SimpleXMLElement::__construct(): ^ in /in/NOZaD on line 3 Fatal error: Uncaught Exception: String could not be parsed as XML in /in/NOZaD:3 Stack trace: #0 /in/NOZaD(3): SimpleXMLElement->__construct('"<?xml version=...') #1 {main} thrown in /in/NOZaD on line 3
Process exited with code 255.

preferences:
206.36 ms | 402 KiB | 239 Q