3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $postvals = array( 'barcode' => 'CP021325078TR', 'security_code' => $capcha2 ); $_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_POST, true ); curl_setopt($_h, CURLOPT_POSTFIELDS, $postvals ); 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 v4ZDc
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 5 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/FCYJ5:8 Stack trace: #0 {main} thrown in /in/FCYJ5 on line 8
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 6 Warning: Invalid argument: option: 91 in /in/FCYJ5 on line 16 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.003169) ["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

Process exited with code 153.
Output for 5.1.0 - 5.6.28
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 6 Fatal error: Call to undefined function curl_init() in /in/FCYJ5 on line 8
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 5 Fatal error: Call to undefined function curl_init() in /in/FCYJ5 on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 5 Fatal error: Call to undefined function curl_init() in /in/FCYJ5 on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 5 Fatal error: Call to undefined function: curl_init() in /in/FCYJ5 on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 5 Fatal error: Call to undefined function: curl_init() in /in/FCYJ5 on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: capcha2 in /in/FCYJ5 on line 5 Fatal error: Call to undefined function: curl_init() in /in/FCYJ5 on line 8