As of PHP 5.5, password hashing functions have been built directly into PHP. In the meantime, see the aforementioned link and in the comments is a link to a Github project that is forward compatible with these functions and available for PHP >= 5.3.7.