What are some potential security risks associated with using md5 for password hashing in PHP?

Using md5 for password hashing in PHP is not recommended due to its vulnerability to brute force attacks and collision vulnerabilities. It is considered weak and easily crackable, especially with the availability of rainbow tables. To improve security, it is recommended to use stronger hashing algorithms such as bcrypt or Argon2.

// Using bcrypt for password hashing
$options = [
    'cost' => 12,
];

$hashed_password = password_hash($password, PASSWORD_BCRYPT, $options);