3v4l.org

run code in 300+ PHP versions simultaneously
<?php $good_mac = hex2bin("0b12ae50aa4be68973372730489521f8cf77972a73b0e8c86fde8d97eaa84f02"); $bad_mac = hex2bin("0b12ae5000000000000000000000000000000000000000000000000000000000"); $hmac_key = random_bytes(32); var_dump( hash_hmac('sha256', $good_mac, $hmac_key), hash_hmac('sha256', $bad_mac, $hmac_key), hash_hmac('sha256', $good_mac, $hmac_key) === hash_hmac('sha256', $bad_mac, $hmac_key), );
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
Parse error: syntax error, unexpected ')' in /in/17APC on line 12
Process exited with code 255.

preferences:
53.83 ms | 402 KiB | 20 Q