What are common pitfalls when 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 the availability of faster hashing algorithms. Instead, it is recommended to use stronger algorithms like bcrypt or Argon2 for better security.

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