PHP does not have a password function.
You should avoid this function because it would require that mysql be in use which will lock you're application into a requirement for having mysql. Other than that, I have no knowledge of the PASSWORD() function. If you're recommended to avoid it, its likely due to a weak hash algorithm.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php