3v4l.org

run code in 300+ PHP versions simultaneously
<?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;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: include_once(): open_basedir restriction in effect. File(simple_html_dom.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/BaF9o on line 4 Warning: include_once(simple_html_dom.php): Failed to open stream: Operation not permitted 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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
61.02 ms | 402 KiB | 8 Q