What are the potential security risks of storing user passwords in plain text in PHP applications?

Storing user passwords in plain text in PHP applications poses a significant security risk as it exposes sensitive information in the event of a data breach. To mitigate this risk, passwords should be securely hashed using a strong hashing algorithm like bcrypt before storing them in the database.

// Hashing user password before storing it in the database
$password = $_POST['password'];
$hashed_password = password_hash($password, PASSWORD_BCRYPT);
// Store $hashed_password in the database