3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.flightstats.com/go/FlightStatus/flightStatusByFlight.do?airlineCode=FR&amp;flightNumber=2220"); //curl_setopt($ch, CURLOPT_FILE, $fp); $html = curl_exec($ch); // grab URL and pass it to the browser //$data = curl_exec($ch); //var_dump($data); // close cURL resource, and free up system resources curl_close($ch); $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXpath($doc); // example 1: for everything with an id //$elements = $xpath->query("//*[@id]"); // example 2: for node data in a selected id //$elements = $xpath->query("/html/body/div[@id='yourTagIdHere']"); // example 3: same as above with wildcard $elements = $xpath->query("*/div[@class='flightStatusByFlightBlock']"); var_dump($elements); //if (!is_null($elements)) { foreach ($elements as $element) { //echo "<br/>[". $element->nodeName. "]"; var_dump($element); //$nodes = $element->childNodes; //foreach ($nodes as $node) { // echo $node->nodeValue. "\n"; //} } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/svdE9:4 Stack trace: #0 {main} thrown in /in/svdE9 on line 4
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:
48.56 ms | 401 KiB | 8 Q