In what scenarios should a PHP developer separate the password change form into multiple text fields?

When designing a password change form, it is recommended to separate the password into multiple text fields to enhance security and prevent shoulder surfing attacks. By splitting the password input into multiple fields, users can enter their password in a less vulnerable manner. This can also help reduce input errors and improve the overall user experience.

<form method="post" action="change_password.php">
    <label for="current_password">Current Password:</label>
    <input type="password" id="current_password" name="current_password" required><br><br>
    
    <label for="new_password1">New Password:</label>
    <input type="password" id="new_password1" name="new_password1" required><br><br>
    
    <label for="new_password2">Confirm New Password:</label>
    <input type="password" id="new_password2" name="new_password2" required><br><br>
    
    <input type="submit" value="Change Password">
</form>