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 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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.
Output for 5.2.3 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Call to undefined function curl_init() in /in/KquvQ on line 2
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
<br /> <b>Fatal error</b>: Call to undefined function curl_init() in <b>/in/KquvQ</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: curl_init() in <b>/in/KquvQ</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: curl_init() in <b>/in/KquvQ</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: curl_init() in <b>/in/KquvQ</b> on line <b>2</b><br />

preferences:
330.4 ms | 401 KiB | 464 Q