What are the potential security risks associated with using the md5 function for passwords in PHP?

Using the md5 function for password hashing in PHP is not secure because it is a fast 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.

$password = "password123";
$hashed_password = password_hash($password, PASSWORD_BCRYPT);