If you are using PHP >= 5.3, the function openssl_digest should do the trick :
echo openssl_digest($pass, 'sha512');
// result
ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff
echo md5($pass);
// result
098f6bcd4621d373cade4e832627b4f6
And with PHP 5.1 or 5.2, you have the hash function :
echo hash('sha512', $pass);
// result
ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff
echo md5($pass);
098f6bcd4621d373cade4e832627b4f6