3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-type: text/plaintext'); $url = 'http://www.pcdiga.com/2/12164/Motherboard-MSI-B85M-E45'; ///* function get_url_contents($url){ $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } //*/ //$page=file_get_contents($url); $page=get_url_contents($url); $price=preg_match("/span id\=\"preco_grelha\"\>(.*)<\/span\>/u", $page, $matches); print_r ($price); print ($matches); //print (); print ($page); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/psM0L:9 Stack trace: #0 /in/psM0L(22): get_url_contents('http://www.pcdi...') #1 {main} thrown in /in/psM0L on line 9
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:
51.82 ms | 401 KiB | 8 Q