Are there better alternatives to storing passwords than using MD5 and Salt in PHP?

Using MD5 and Salt for storing passwords in PHP is not considered secure as MD5 is a weak hashing algorithm and can be easily cracked. A better alternative is to use stronger hashing algorithms like bcrypt or Argon2, which are specifically designed for password hashing and are more secure.

// Hashing password using bcrypt
$hashed_password = password_hash($password, PASSWORD_BCRYPT);

// Verifying password
if (password_verify($password, $hashed_password)) {
    // Password is correct
} else {
    // Password is incorrect
}