Use an encryption such as MD5, then salt the hashes. Salting them is a way of making all the hashes unique, of them same length (usually) and therefore not readily available in public hash databases. So even if one of your users had the password 'password', the hash wouldn't be found in a database online anywhere because it would be unique.
You can do this in PHP:
Code:
<?php
$password = md5('g5-H+DD1*a' . $password);
?>
The first part is the salt, the second part is the variable you want to encrypt
As said, public algorithms are more secure. Although they're more publically viewable, they're made by professionals, are very secure, are usually one-way algorithms and you probably won't be able to beat 128-bit encryptions with your own.
If you make one yourself, it could most likely be decrypted by reversing the algorithm, which despite being time consuming, would be a lot quicker to do than generating rainbow tables, brute-forcing or dictionary attacking a public encryption.