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($hash2); $hash2 = hash_hmac('sha256', $message, $secret, true); $encoded2 = base64_encode($hash2); var_dump(hash_equals($hash1, $hash2));
based on h6RTt
Output for 5.6.8 - 7.2.8
Notice: Undefined variable: hash2 in /in/65FYb on line 6 bool(true)
Output for 5.1.2 - 5.5.35
Notice: Undefined variable: hash2 in /in/65FYb on line 6 Fatal error: Call to undefined function hash_equals() in /in/65FYb on line 11
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Call to undefined function hash_hmac() in /in/65FYb 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/65FYb 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/65FYb 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/65FYb on line 5