In my user database table, I take the MD5 hash of the email address of a user as the id.
Example: email(example@example.org) = id(d41d8cd98f00b204e9800998ecf8427e)
email(example@example.org) = id(d41d8cd98f00b204e9800998ecf8427e)
what about:
$float = hexdec(md5('string'));
or
$int = (integer) (substr(hexdec(md5('string')),0,9)*100000000);
Definitely bigger chances for collision but still good enaugh to use instead of hash in DB though?