What are the potential pitfalls of using md5 for password encryption in PHP?

Using MD5 for password encryption in PHP is not recommended as it is considered insecure due to its vulnerability to collision attacks. It is better to use stronger hashing algorithms such as bcrypt or Argon2 for password hashing to enhance security.

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