What potential issues or vulnerabilities can arise from using the "md5" function for password hashing in PHP?

Using the "md5" function for password hashing in PHP is not secure because it is considered to be a weak hashing algorithm. It is vulnerable to brute force attacks and rainbow table attacks, which can easily crack hashed passwords. To improve security, it is recommended to use stronger hashing algorithms such as bcrypt or Argon2.

// Implementing password hashing with bcrypt
$hashed_password = password_hash($password, PASSWORD_BCRYPT);