How can PHP distinguish between lowercase and uppercase special characters in preg_match?

When using preg_match in PHP to match special characters, it does not inherently distinguish between lowercase and uppercase special characters. To make PHP distinguish between lowercase and uppercase special characters, you can use the "i" modifier in the regular expression pattern, which makes the matching case-insensitive.

$string = "Hello, World!";
$pattern = '/hello/i'; // case-insensitive match for "Hello"
if (preg_match($pattern, $string)) {
    echo "Match found!";
} else {
    echo "No match found.";
}