3v4l.org

run code in 300+ PHP versions simultaneously
<?php #header('Content-type:application/json;charset=utf-8'); $url = 'http://exotel.in/hacks/exotel-geo/iframe-index.php'; $data = array('mobile_number' => '7266788211'); // use key 'http' even if you send the request to https://... $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data), ), ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); #var_dump($result); # Create a DOM parser object $dom = new DOMDocument(); @$dom->loadHTML($result); #$output = array(); # Iterate over all the <a> tags foreach($dom->getElementsByTagName('h2') as $link) { # Show the <a href> echo $link->nodeValue; echo "<br />"; } #var_dump($result); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for exotel.in failed: System error in /in/WgdkW on line 17 Warning: file_get_contents(http://exotel.in/hacks/exotel-geo/iframe-index.php): Failed to open stream: php_network_getaddresses: getaddrinfo for exotel.in failed: System error in /in/WgdkW on line 17 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/WgdkW:23 Stack trace: #0 /in/WgdkW(23): DOMDocument->loadHTML('') #1 {main} thrown in /in/WgdkW on line 23
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:
58.86 ms | 402 KiB | 8 Q