What are the potential security risks associated with using MD5 for password encryption in PHP?

Using MD5 for password encryption in PHP poses a security risk because MD5 is considered a weak hashing algorithm that can be easily cracked using modern computing power. To improve security, it is recommended to use stronger hashing algorithms like bcrypt or Argon2 for password encryption.

// Using bcrypt for password encryption
$hashed_password = password_hash($password, PASSWORD_BCRYPT);