3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $xml = "https://api.eancdn.com/ean-services/rs/hotel/v3/info?cid=55505&minorRev=99&apiKey=cbrzfta369qwyrm9t5b8y8kf&locale=in_ID&currencyCode=IDR&xml=%3CHotelInformationRequest%3E%3ChotelId%3E122212%3C%2FhotelId%3E%3Coptions%3E0%3C%2Foptions%3E%3C%2FHotelInformationRequest%3E"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( './/child') as $child) { echo $child->attributes()['name'] . "\n"; }
Output for 7.0.0 - 7.1.0
Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/DgHHT on line 4 Warning: simplexml_load_string(): https://api.eancdn.com/ean-services/rs/hotel/v3/info?cid=55505&minorRev=99&apiKe in /in/DgHHT on line 4 Warning: simplexml_load_string(): ^ in /in/DgHHT on line 4 Fatal error: Uncaught Error: Call to a member function xpath() on boolean in /in/DgHHT:6 Stack trace: #0 {main} thrown in /in/DgHHT on line 6
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/DgHHT on line 4 Warning: simplexml_load_string(): https://api.eancdn.com/ean-services/rs/hotel/v3/info?cid=55505&minorRev=99&apiKe in /in/DgHHT on line 4 Warning: simplexml_load_string(): ^ in /in/DgHHT on line 4 Fatal error: Call to a member function xpath() on boolean in /in/DgHHT on line 6
Process exited with code 255.
Output for 5.4.0 - 5.5.38
Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /in/DgHHT on line 4 Warning: simplexml_load_string(): https://api.eancdn.com/ean-services/rs/hotel/v3/info?cid=55505&minorRev=99&apiKe in /in/DgHHT on line 4 Warning: simplexml_load_string(): ^ in /in/DgHHT on line 4 Fatal error: Call to a member function xpath() on a non-object in /in/DgHHT on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /in/DgHHT on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ',' or ';' in /in/DgHHT on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/DgHHT on line 7
Process exited with code 255.