3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'selenagomez'; //$_GET['username'] /* # Use the Curl extension to query Google and get back a page of results $url = "http://instagram.myhacks.net/processing_request.php?username=$username"; $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $html = curl_exec($ch); curl_close($ch); $dom = new DOMDocument(); @$dom->loadHTML($html); foreach($dom->getElementsByid('#current-followers-value') as $link) { # Show the <a href> echo $link->first_child()->plaintext; echo "<br />"; } */ $page = "http://instagram.myhacks.net/processing_request.php?username=" . $username; $dom = new DOMDocument(); @$dom->loadHTML($page); $xpath = new DomXpath($dom); foreach($xpath->query("//tr[@class='row profile-info-row']") as $row){ echo $xpath->query(".//span[contains(@id,'current-followers-value')]",$row)->item(0)->nodeValue."\n"; echo 7*7; } echo 7*7; /* include('simple_html_dom.php'); $followerslink = $html->getElementById('current-followers-value'); echo $followerslink->textContent; echo "<br />"; */ ?>
Output for git.master, git.master_jit, rfc.property-hooks
49

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:
64.13 ms | 401 KiB | 8 Q