3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_VERBOSE => 1, CURLOPT_RETURNTRANSFER => 1, CURLOPT_FOLLOWLOCATION => 1, // CURLOPT_CAPATH => './', // CURLOPT_SSL_VERIFYHOST => 0, // CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_FOLLOWLOCATION => 1, CURLOPT_BINARYTRANSFER => 1, // CURLOPT_REFERER => 'https://agenciavirtual.light.com.br/', // CURLOPT_SSLVERSION => 2, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => array( // 'Connection: keep-alive', 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0', // 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', // 'Accept-Encoding: gzip, deflate', // 'Cache-Control: max-age=0' ), CURLOPT_URL => 'https://agenciavirtual.light.com.br/LASView/captcha.jpg' // CURLOPT_URL => 'https://mail.google.com/mail/u/0/#inbox' )); $resp = curl_exec($curl); echo "Error:\n"; var_dump(curl_error($curl)); echo "curl_getinfo:\n"; var_dump(curl_getinfo($curl, CURLINFO_HTTP_CODE)); // var_dump(curl_getinfo($curl)); echo "return of curl_exec:\n"; var_dump($resp); // Close request to clear up some resources curl_close($curl);
based on D50TS
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/XuUH9:3 Stack trace: #0 {main} thrown in /in/XuUH9 on line 3
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/XuUH9 on line 3
Process exited with code 255.