3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument('1.0', 'UTF-8'); $teamName = 'RC Drachten'; // Ignore warnings. libxml_use_internal_errors(true); // load the string into the DOM (this is your page's HTML), see below for more info $doc->loadHTMLFile ('http://www.resultservices.nl/rugby/overview.php?Page=SENIOR&LevelID=5&CompID=816'); // since we are working with HTML fragments here, remove <!DOCTYPE $doc->removeChild($doc->firstChild); // remove <html></html> and any junk $table = $doc->getElementsByTagName('table'); //$doc->replaceChild($body->item(0), $doc->firstChild); // echo the HTML (or desired portion thereof) $schedule = $doc->saveXML($table->item(1)); // Seperate each team $teams = explode ('</tr>',$schedule); echo $teams[0]; // Html table echo $teams[2]; // Table header for ($i = 0;$i<count($teams);$i++) { // Check if this is the right team $pos = strpos($teams[$i],$teamName); if ($pos !== false) { echo $teams[$i]; } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: DOMDocument::loadHTMLFile(): php_network_getaddresses: getaddrinfo for www.resultservices.nl failed: System error in /in/hsDlk on line 8 Warning: DOMDocument::loadHTMLFile(http://www.resultservices.nl/rugby/overview.php?Page=SENIOR&LevelID=5&CompID=816): Failed to open stream: php_network_getaddresses: getaddrinfo for www.resultservices.nl failed: System error in /in/hsDlk on line 8 Fatal error: Uncaught TypeError: DOMNode::removeChild(): Argument #1 ($child) must be of type DOMNode, null given in /in/hsDlk:11 Stack trace: #0 /in/hsDlk(11): DOMNode->removeChild(NULL) #1 {main} thrown in /in/hsDlk on line 11
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:
40.69 ms | 402 KiB | 8 Q