What potential security risks are present in the use of md5 for password hashing in PHP?

Using MD5 for password hashing in PHP is not secure due to its vulnerability to collisions and brute force attacks. It is recommended to use stronger hashing algorithms like bcrypt or Argon2 for better security.

// Example of using bcrypt for password hashing in PHP
$password = "password123";
$hashed_password = password_hash($password, PASSWORD_BCRYPT);