3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ch = curl_init(); $hostname = 'www.baidu.com'; $url = "https://{$hostname}/163608693694254"; $cert = realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'facebook-php-sdk-master'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'fb_ca_chain_bundle.crt'); echo "IP address: ".gethostbyname($hostname)."<br/>"; echo "Certificate path: {$cert}<br/>\n"; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); curl_setopt($ch, CURLOPT_CAINFO, $cert); curl_setopt($ch, CURLOPT_SSLVERSION,3); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_CERTINFO, true); $result = curl_exec($ch); echo "cURL Error: (".curl_errno($ch).") ".curl_error($ch)."<br/>\n"; echo "<pre>".print_r(curl_getinfo($ch), true)."</pre><br/>\n"; echo "<pre>".htmlspecialchars($result)."</pre>"; curl_close($ch); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/KquvQ:2 Stack trace: #0 {main} thrown in /in/KquvQ on line 2
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:
50.14 ms | 401 KiB | 8 Q