3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $key = 'APIKEY'; $secret = 'APISECRET'; $timestamp = time(); $signature = hash_hmac('sha1', "timestamp=".$timestamp, $secret); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.domain.com/getticker"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, "timestamp=".time()); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded","key: ".$key,"sig: ".$signature)); $response = curl_exec($ch); curl_close($ch); echo $response;
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/2dCgP:9 Stack trace: #0 {main} thrown in /in/2dCgP on line 9
Process exited with code 255.
Output for 5.5.0 - 5.6.25
Fatal error: Call to undefined function curl_init() in /in/2dCgP on line 9
Process exited with code 255.