3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $message = 'Message'; $secret = 'secret'; $hash1 = hash_hmac('sha256', $message, $secret, true); $encoded1 = base64_encode($hash1); $hash2 = base64_decode($hash1); //$hash2 = hash_hmac('sha256', $message, $secret, true); //$encoded2 = base64_encode($hash2); var_dump(hash_equals($hash1, $hash2));
based on O6Kah
Output for 5.6.0 - 7.3.0rc4
bool(false)
Output for 5.1.2 - 5.5.38
Fatal error: Call to undefined function hash_equals() in /in/T5LpT on line 13
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Call to undefined function hash_hmac() in /in/T5LpT on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hash_hmac() in /in/T5LpT on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: hash_hmac() in /in/T5LpT on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hash_hmac() in /in/T5LpT on line 5