3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Access-Control-Allow-Origin: *'); $html = "http://www.margonem.pl/?task=clanrank&w=infinity"; $xml = new DOMDocument(); $xml->validateOnParse = true; $xml->loadHTML(file_get_contents($html)); $xpath = new DOMXPath($xml); $table =$xpath->query("//*[@id='ranking']")->item(0); $rows = $table->getElementsByTagName("tr"); foreach ($rows as $row) { $cells = $row -> getElementsByTagName('td'); foreach ($cells as $cell) { print $cell->nodeValue; } }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.margonem.pl failed: System error in /in/5Sra2 on line 6 Warning: file_get_contents(http://www.margonem.pl/?task=clanrank&w=infinity): Failed to open stream: php_network_getaddresses: getaddrinfo for www.margonem.pl failed: System error in /in/5Sra2 on line 6 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/5Sra2:6 Stack trace: #0 /in/5Sra2(6): DOMDocument->loadHTML('') #1 {main} thrown in /in/5Sra2 on line 6
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:
67.43 ms | 401 KiB | 8 Q