3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = <<<XML <global> <entity_id><![CDATA[82]]></entity_id> <attribute_set_id><![CDATA[9]]></attribute_set_id> <sku><![CDATA[ana_8]]></sku> <erp> <barcode></barcode> <erp> </global> XML; echo json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA));
Output for 5.5.0 - 7.2.0
Warning: simplexml_load_string(): Entity: line 8: parser error : Opening and ending tag mismatch: erp line 7 and global in /in/9KMlM on line 14 Warning: simplexml_load_string(): </global> in /in/9KMlM on line 14 Warning: simplexml_load_string(): ^ in /in/9KMlM on line 14 Warning: simplexml_load_string(): Entity: line 8: parser error : Premature end of data in tag erp line 5 in /in/9KMlM on line 14 Warning: simplexml_load_string(): </global> in /in/9KMlM on line 14 Warning: simplexml_load_string(): ^ in /in/9KMlM on line 14 Warning: simplexml_load_string(): Entity: line 8: parser error : Premature end of data in tag global line 1 in /in/9KMlM on line 14 Warning: simplexml_load_string(): </global> in /in/9KMlM on line 14 Warning: simplexml_load_string(): ^ in /in/9KMlM on line 14 false