3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Create DOM from URL or file include_once('simple_html_dom.php'); // Create DOM from URL or file $html = file_get_html('http://battlelog.battlefield.com/bf4/de/platoons/members/7973599489869481496/'); $myDiv = $html->find('div'); // wherever your the div you're ending up with is $children = $myDiv->children; // get an array of children foreach ($children AS $child) { $child->outertext = ''; // This removes the element, but MAY NOT remove it from the original $myDiv } echo $myDiv->innertext;
based on PkH8n
Output for 7.0.0 - 7.2.0
Warning: include_once(simple_html_dom.php): failed to open stream: No such file or directory in /in/BaF9o on line 4 Warning: include_once(): Failed opening 'simple_html_dom.php' for inclusion (include_path='.:') in /in/BaF9o on line 4 Fatal error: Uncaught Error: Call to undefined function file_get_html() in /in/BaF9o:7 Stack trace: #0 {main} thrown in /in/BaF9o on line 7
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Warning: include_once(simple_html_dom.php): failed to open stream: No such file or directory in /in/BaF9o on line 4 Warning: include_once(): Failed opening 'simple_html_dom.php' for inclusion (include_path='.:') in /in/BaF9o on line 4 Fatal error: Call to undefined function file_get_html() in /in/BaF9o on line 7
Process exited with code 255.