How can modifiers like i affect the outcome of regular expressions in PHP?

Modifiers like "i" in regular expressions in PHP affect the outcome by making the pattern match case-insensitive. This means that the pattern will match regardless of the case of the letters in the input string. To use the "i" modifier, simply add it after the pattern in the regular expression.

$input = "Hello World";
$pattern = "/hello/i";
if (preg_match($pattern, $input)) {
    echo "Pattern matched!";
} else {
    echo "Pattern not matched.";
}