3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = <<<XML <Photos> <Photo order="1"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_2.jpg</Filename> </Photo> <Photo order="2"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_3.jpg</Filename> </Photo> <Photo order="3"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_4.jpg</Filename> </Photo> <Photo order="4"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_5.jpg</Filename> </Photo> <Photo order="5"> <Filename>http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_6.jpg</Filename> </Photo> </Photos> XML; $xml = simplexml_load_string($x); $photos = $xml->xpath("//Photo"); foreach ($photos as $photo) echo "order: $photo[order], file: $photo->Filename<br />";
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
order: 1, file: http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_2.jpg<br />order: 2, file: http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_3.jpg<br />order: 3, file: http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_4.jpg<br />order: 4, file: http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_5.jpg<br />order: 5, file: http://usedcarpics.s3.amazonaws.com/514SPINELLITOYOTA2/b5092588_6.jpg<br />
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/j9lV8 on line 23
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/j9lV8 on line 23
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: simplexml_load_string() in /in/j9lV8 on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/j9lV8 on line 23