3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'POST\n/auth/token\nproject=xRxyG0P5&ai=95335e7caf2f6a92&tm=1513574899'; $key = 'HmacSHA256'; $signature = String2Hex(hash_hmac("sha256", $str, $key, true)); function String2Hex($string){ $hex=''; for ($i=0; $i < strlen($string); $i++){ $hex .= dechex(ord($string[$i])); } return $hex; } echo $signature;exit; ?>
Output for 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
b29bfbfcc3b1bfc9aa3c3502486327d28953e65893f85f51d488ac9efbbfa35
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 b29bfbfcc3b1bfc9aa3c3502486327d28953e65893f85f51d488ac9efbbfa35

preferences:
148.42 ms | 402 KiB | 171 Q