3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'POST\n/auth/token\nproject=xRxyG0P5&ai=95335e7caf2f6a92&tm=1513574899'; $key = 'e68c202f73c54468b9822c843b320d34'; $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 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 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
4960e47454b272849238e7f9d0aab6a22bb53ea6a7f312de3d55603aac316a
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 4960e47454b272849238e7f9d0aab6a22bb53ea6a7f312de3d55603aac316a

preferences:
224.98 ms | 402 KiB | 291 Q