3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $contentData = '<texts><text_0_1><![CDATA[Conte├║do de texto aleat├│rio. 16:41. <BR>14/11/2013]]></text_0_1></texts><medias><image_0_0><![CDATA[http://teste.croobly.com.br/module-content/images/1476978532.jpg]]></image_0_0></medias>'; $croobly_data = simplexml_load_string("<content>".$contentData."</content>"); $croobly_data = $croobly_data->xpath('medias'); foreach($croobly_data->children() as $media) { print_r($media); //echo $media->asXML(); } //print_r($croobly_data);
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to a member function children() on array in /in/A6fDE:7 Stack trace: #0 {main} thrown in /in/A6fDE on line 7
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Fatal error: Call to a member function children() on array in /in/A6fDE on line 7
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.5.38
Fatal error: Call to a member function children() on a non-object in /in/A6fDE on line 7
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/A6fDE on line 14
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/A6fDE on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/A6fDE on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/A6fDE on line 4