Is using MD5 for password generation a secure practice in PHP development?

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

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