A cryptographic hash function is a hash function which is considered practically impossible to invert, that is, to recreate the input data from its hash value alone. These one-way hash functions have been called "the workhorses of modern cryptography". The input data is often called the message, and the output the hash value (the hash) is often called the message digest or simply the digest.
[ Wikipedia - PHP.net hash ]

Code
$str = 'test';
$result = hash('md5', $str);
> 098f6bcd4621d373cade4e832627b4f6