3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = file_get_contents("http://www.ibge.gov.br/home/geociencias/areaterritorial/area.php?nome=garibaldi"); $xml = new DOMDocument(); //$xml->strictErrorChecking = false; //$xml->recover=true; //$xml->loadHTMLFile($url); $xml->preserveWhiteSpace = false; $xml->loadHTML("<html><body>" . $url . "</body></html>"); $find = new DOMXPath($xml); $classe = "alinha_direita"; //$nodos = $find->query("//*[contains(@class, 'alinha_direita')]"); $nodos = $find->query('//*[@class="alinha_direita"]'); var_dump($nodos); foreach($nodos as $no) { echo $no->nodeValue, PHP_EOL; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.ibge.gov.br failed: System error in /in/3ou8W on line 3 Warning: file_get_contents(http://www.ibge.gov.br/home/geociencias/areaterritorial/area.php?nome=garibaldi): Failed to open stream: php_network_getaddresses: getaddrinfo for www.ibge.gov.br failed: System error in /in/3ou8W on line 3 object(DOMNodeList)#3 (1) { ["length"]=> int(0) }

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:
28.28 ms | 402 KiB | 8 Q