What are the limitations of using MD5 encryption for password storage in PHP, and what alternative encryption methods can be considered?

Using MD5 encryption for password storage in PHP is not secure because it is vulnerable to various attacks such as collision attacks and rainbow table attacks. It is recommended to use stronger encryption methods such as bcrypt or Argon2 for secure password storage.

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