3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $contentData = '<content><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></content>'; $dom = new DOMDocument(); $dom->loadXML($contentData); $dom = $dom->getElementsByTagName("medias"); foreach($dom as $image) { echo $image->nodeValue, PHP_EOL; } /* $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'); $croobly_data = $croobly_data->children(); foreach($croobly_data as $media) { print_r($media->nodeValue); //echo $media->asXML(); } */ //print_r($croobly_data);
Output for 5.0.2 - 5.0.5, 5.1.1 - 7.1.0
http://teste.croobly.com.br/module-content/images/1476978532.jpg
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/Hujpi on line 28
Process exited with code 255.
Output for 5.0.0 - 5.0.1
http://teste.croobly.com.br/module-content/images/1476978532.jpg Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Hujpi on line 9 PHP_EOL
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/Hujpi on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/Hujpi on line 4