What are the potential security risks of using crypt command for password encryption in PHP/MySQL applications?

Using the crypt command for password encryption in PHP/MySQL applications can pose security risks as it uses a weak encryption algorithm. It is recommended to use stronger encryption methods like bcrypt or Argon2 for securely hashing passwords.

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