3v4l.org

run code in 300+ PHP versions simultaneously
<?php $accessID = "09d67621"; $secretKey = "c0ab83a5057b00d294a2b7531ce21236"; $expires = mktime() + 300; // The request is good for the next 5 minutes, or 300 seconds from now. $stringToSign = $accessID."\n".$expires; // Get the "raw" or binary output of the hmac hash. $binarySignature = hash_hmac('sha1', $stringToSign, $secretKey, true); // We need to base64-encode it and then url-encode that. $urlSafeSignature = urlencode(base64_encode($binarySignature)); $urlToFetch = "http://api3.wordtracker.com/search?keyword=cheap&app_id=09d67621&app_key=c0ab83a5057b00d294a2b7531ce21236&limit=3"; echo $urlToFetch; $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, $urlToFetch); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 120); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); $buffer = curl_exec($curl_handle); curl_close($curl_handle); $buffer=utf8_encode($buffer); $arr = json_decode($buffer); print_r($arr); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: mktime() expects at least 1 argument, 0 given in /in/T0uVq:5 Stack trace: #0 /in/T0uVq(5): mktime() #1 {main} thrown in /in/T0uVq on line 5
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.61 ms | 401 KiB | 8 Q