What are the potential pitfalls of using MD5 encryption for passwords in PHP applications?

Using MD5 encryption for passwords in PHP applications is not secure because MD5 is considered a weak hashing algorithm that can be easily cracked using modern computing power. It is recommended to use more secure hashing algorithms like bcrypt or Argon2 for password hashing in PHP applications.

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