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)
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?
Be careful. Converting the MD5s to an integer will require support for big (128-bit) integers. Chances are the API you're using will only support 32-bit integers - or worse, might be dealing with the number in floating-point. Either way, your ID will get munged. If this is the case, just assigning a second ID arbitrarily is a much better way to deal with things than trying to convert the MD5 into an integer.
However, if you are sure that the API can deal with arbitrarily large integers without trouble, you can just convert the MD5 from hexadecimal to an integer. PHP most likely does not support this built-in however, as it will try to represent it as either a 32-bit integer or a floating point; you'll probably need to use the PHP GMP library for it.