3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = "http://www.google.com/"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_NOBODY, TRUE); // remove body $head = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); var_dump($head); ?>
based on DWAbN
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/mamcM:3 Stack trace: #0 {main} thrown in /in/mamcM on line 3
Process exited with code 255.
Output for hhvm-3.18.5 - 3.22.0
bool(false)
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function curl_init() in /in/mamcM on line 3
Process exited with code 255.