What are the potential risks of using base64 encoding for password storage in PHP?

Using base64 encoding for password storage in PHP is not secure because it is not a secure method for hashing passwords. It is not designed for password hashing and can easily be decoded, making the passwords vulnerable to attacks. Instead, it is recommended to use a secure hashing algorithm like bcrypt for password storage in PHP.

// Using bcrypt for secure password hashing
$password = "password123";
$hashedPassword = password_hash($password, PASSWORD_BCRYPT);