- hash_hmac: documentation ( source)
- print_r: documentation ( source)
- str_pad: documentation ( source)
- unpack: documentation ( source)
<?php
$array = unpack('Vint/Vint', hash_hmac('md5', str_pad(646, 4, '0', STR_PAD_LEFT), 'default', true));
print_r($array);
echo $array['int'] & 16;