3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function BitBay_Trading_Api($method, $params = array()) { $key = "123"; $secret = "321"; $params["method"] = "info"; $params["moment"] = time(); $post = http_build_query($params, "", "&"); $sign = hash_hmac("sha512", $post, $secret); $headers = array( "API-Key: " . $key, "API-Hash: " . $sign, ); $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, "https://bitbay.net/API/Trading/tradingApi.php"); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); //$ret = curl_exec($curl); // return $ret; return $params["method"]; }
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.2.6