PHP also uses the one-way 'crypt()' hashing algorithm.
The prototype is:
string crypt (string str [, string salt])
So you might do something like:
$password = "mycrazypass";
$encrypted_password = crypt($password, 'xx');
Or you could verify a correct password like this:
if (crypt($password, 'xx') == 'xxkT1mYjlikoII') {
do_something();
}
Hope that's helpful,
Bryan