How can PHP be used to check for the original case sensitivity of a string, especially for password validation?

When checking for the original case sensitivity of a string, especially for password validation, one approach is to compare the input password with the original password stored in a database using a case-sensitive comparison. This ensures that the correct case is maintained during validation.

// Original password stored in the database
$originalPassword = "SecretPassword123";

// Input password from user
$inputPassword = $_POST['password'];

// Check if the input password matches the original password with case sensitivity
if ($inputPassword === $originalPassword) {
    echo "Password is correct";
} else {
    echo "Password is incorrect";
}