For user verification emails, I want to send my users an email that includes a secure hash based on the user id and a randomly generated salt. However all of php's functions are aimed towards password hashing, and so store the salt in the hash for password verification. Since I intent to send the user this hash, there is no need for this.

I'm aware of the md5 function, which doesn't include the salt, but I'm lead to believe an md5 hash is not secure. 

Is there any way to hash (preferably with one line of code) a string in php and return a pure hash without the salt?