3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_h = curl_init(); curl_setopt($_h, CURLOPT_HEADER, 1); curl_setopt($_h, CURLOPT_RETURNTRANSFER, 1); curl_setopt($_h, CURLOPT_HTTPGET, 1); curl_setopt($_h, CURLOPT_URL, 'http://www1.ptt.gov.tr/tr/interaktif/sonuc-yd.php' ); curl_setopt($_h, CURLOPT_DNS_USE_GLOBAL_CACHE, false ); curl_setopt($_h, CURLOPT_DNS_CACHE_TIMEOUT, 2 ); var_dump(curl_exec($_h)); var_dump(curl_getinfo($_h)); var_dump(curl_error($_h));
based on TvReB
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/Efu2q:5 Stack trace: #0 {main} thrown in /in/Efu2q on line 5
Process exited with code 255.
Output for hhvm-3.12.0
Warning: Invalid argument: option: 91 in /in/Efu2q on line 10 bool(false) array(21) { ["url"]=> string(49) "http://www1.ptt.gov.tr/tr/interaktif/sonuc-yd.php" ["content_type"]=> NULL ["http_code"]=> int(0) ["header_size"]=> int(0) ["request_size"]=> int(0) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["local_port"]=> int(0) ["total_time"]=> float(0.000116) ["namelookup_time"]=> float(0) ["connect_time"]=> float(0) ["pretransfer_time"]=> float(0) ["size_upload"]=> float(0) ["size_download"]=> float(0) ["speed_download"]=> float(0) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(-1) ["starttransfer_time"]=> float(0) ["redirect_time"]=> float(0) } string(39) "Could not resolve host: www1.ptt.gov.tr"
Output for hhvm-3.10.0
Warning: Invalid argument: option: 91 in /in/Efu2q on line 10 bool(false) array(21) { ["url"]=> string(49) "http://www1.ptt.gov.tr/tr/interaktif/sonuc-yd.php" ["content_type"]=> NULL ["http_code"]=> int(0) ["header_size"]=> int(0) ["request_size"]=> int(0) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["local_port"]=> int(0) ["total_time"]=> float(0.000117) ["namelookup_time"]=> float(0) ["connect_time"]=> float(0) ["pretransfer_time"]=> float(0) ["size_upload"]=> float(0) ["size_download"]=> float(0) ["speed_download"]=> float(0) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(-1) ["starttransfer_time"]=> float(0) ["redirect_time"]=> float(0) } string(39) "Could not resolve host: www1.ptt.gov.tr"
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/Efu2q on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl_init() in /in/Efu2q on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl_init() in /in/Efu2q on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: curl_init() in /in/Efu2q on line 5