3v4l.org

run code in 300+ PHP versions simultaneously
<?php function calculate_signature($string, $private_key) { $hash = hash_hmac("sha1", $string, $private_key, true); $sig = rawurlencode(base64_encode($hash)); return $sig; } $api_key = "1234"; $private_key = "abcd"; $method = "GET"; $route = "forms/1/entries"; $expires = strtotime("7:00"); $string_to_sign = sprintf("%s:%s:%s:%s", $api_key, $method, $route, $expires); $sig = calculate_signature($string_to_sign, $private_key); var_dump($sig); ?>
Output for git.master, git.master_jit, rfc.property-hooks
string(30) "64SdpxjsutiBmvE4MiiKmfqla1o%3D"

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:
51 ms | 401 KiB | 8 Q