What alternatives to MD5 encryption can be used for password storage in PHP applications?

MD5 encryption is considered outdated and insecure for password storage due to its vulnerability to brute force attacks and collisions. To improve security, PHP applications should use stronger hashing algorithms like bcrypt or Argon2 for password storage. These algorithms are specifically designed for securely hashing passwords and are resistant to attacks.

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

// Storing the hashed password securely in the database
// Example: $hashedPassword can be stored in the users table