What are the potential security risks of using the md5 hashing function in PHP for passwords?

Using the md5 hashing function in PHP for passwords is not recommended due to its vulnerability to brute force attacks and collisions. It is considered insecure for password hashing as it is fast and can be easily cracked using modern hardware. It is recommended to use stronger hashing algorithms like bcrypt or Argon2 for secure password storage.

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