3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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"; $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); var_dump(strtotime("7:00")); ?>
based on bBUDi
Output for 5.6.28, 7.0.20 - 7.2.0
string(30) "XG7Ls6UbKbeXG7RUCaByxcxkHYo%3D" int(1445925600)
Output for 7.0.6
string(30) "ArPm9pKVjb7PrQNlqbD60ItOU1U%3D" int(1462251600)
Output for 7.0.5
string(30) "soikkFa1ci1VdIuvQ9ORLdmS0Ho%3D" int(1459659600)
Output for 7.0.4
string(34) "vWoOpa2mjZ%2FGXo%2F4Xs4630kFiHc%3D" int(1457589600)
Output for 7.0.3
string(30) "6DJk2eE9MxEjG05XHnJoCwRrHzc%3D" int(1458280800)
Output for 7.0.2
string(30) "o8AsUpi3KVMJwkmgdSifn6Dygp4%3D" int(1458712800)
Output for 7.0.1
string(30) "lOqbB0a3Kdxe577pjSj19kd3yZE%3D" int(1458799200)
Output for 7.0.0
string(30) "dxD1seeejd8KX28oHytO0AwytxQ%3D" int(1459054800)
Output for 5.6.21
string(32) "%2BPQLbSQcTlKzhYQS4macpcsf9xE%3D" int(1462165200)
Output for 5.6.20
string(32) "W0%2BdlTW5mnjJhumWEbmgSXRZAvs%3D" int(1460264400)
Output for 5.6.19
string(32) "yqClzE0pG%2B6NdmWDtOrTKenib9A%3D" int(1457416800)
Output for 5.6.18
string(30) "IEkFIQX3G2kAZEKYHgUD6DFDwvY%3D" int(1458021600)
Output for 5.6.17
string(30) "GNXRcE0clPC7wzQjdvkJwBFa8W8%3D" int(1458367200)
Output for 5.6.16
string(34) "e42SOFHa%2FgcJ1%2FpJh6gj3s44n6U%3D" int(1459141200)
Output for 5.6.15
string(38) "%2BUdn1FgCBU%2BR%2BF%2FyIDrAH0V6ATw%3D" int(1459227600)
Output for 5.6.14
string(34) "fumsIzDo%2FgDviH251zwYy%2BbCang%3D" int(1459573200)
Output for 5.6.13
string(32) "HjkKqw70%2FwYj2pHOj8gUNMB7TQU%3D" int(1460696400)
Output for 5.6.12
string(32) "zjsqiFm9e9%2FmKgFXa6SHYRkOaTQ%3D" int(1461128400)
Output for 5.6.11
string(30) "4t5fc0YSQwQcBNpcvgTdfdjM3sI%3D" int(1461474000)
Output for 5.6.10
string(32) "vG5YN4X6%2FrgYwgepnFcDgzi8N9Y%3D" int(1461560400)
Output for 5.6.9
string(32) "FqmIZJH3hQQkd5lDFDm%2FRCuyHt4%3D" int(1461733200)
Output for 5.6.8
string(32) "nDSj5q%2B8nU6QlbGZHFgUGfXRdb8%3D" int(1461992400)
Output for 5.5.35
string(32) "j3R%2FXGo7UEXE5hqhiPuLCWp9RsE%3D" int(1463893200)
Output for 5.5.34
string(32) "q0jtxBCQb3f8kYA5%2Fl2ApwNBeIQ%3D" int(1460350800)
Output for 5.5.33
string(30) "yDxADKLgVuQYT9X3cRGish9BhB0%3D" int(1457503200)
Output for 5.5.32
string(30) "dzYaYQoOgDPH4PawJx3cM6TWdT4%3D" int(1458194400)
Output for 5.5.31
string(34) "QNULMAWujZ%2ByGyY8q%2BZjol9PbBc%3D" int(1458540000)
Output for 5.5.30
string(30) "Sphhpl51JUtQ2jXFmD9navvXSss%3D" int(1459486800)
Output for 5.5.29
string(32) "T0sBgqMkZkWrwvDFcWykw%2FALbtQ%3D" int(1460869200)
Output for 5.5.28
string(30) "GenubDScpyxAfvmNkX3TDeDQDXI%3D" int(1461214800)
Output for 5.5.27
string(34) "jr22iZ%2F400C%2BJPwrehgpH2UXBco%3D" int(1461301200)
Output for 5.5.26
string(34) "EUqsyR%2Fw0DhD9F%2F8vQbdt1TvTc0%3D" int(1461646800)
Output for 5.5.25
string(30) "m06rFAKKeGrSoEKUBwflIyAN8Fo%3D" int(1461819600)
Output for 5.5.24
string(30) "GzoJKW3pjdgf6DwChO17Fde4Jc8%3D" int(1464066000)
Output for 5.3.19 - 5.4.45
string(32) "IQkHOc1E%2BLOFyW4O0anxa3Ojv3E%3D" int(1447999200)