In what scenarios does using md5 hashing for passwords in PHP pose potential security risks?

Using md5 hashing for passwords in PHP poses potential security risks because it is considered a weak hashing algorithm that can be easily cracked using modern hardware. To improve security, it is recommended to use stronger hashing algorithms like bcrypt or Argon2.

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