What alternative PHP function can be used for case-insensitive string replacement?

When using the `str_replace()` function in PHP for string replacement, it performs a case-sensitive search for the specified string and replaces it with the new string. If you need to perform a case-insensitive string replacement, you can use the `str_ireplace()` function instead. This function works the same way as `str_replace()`, but it ignores the case of the characters when searching for the specified string.

// Case-insensitive string replacement using str_ireplace()
$string = "Hello World";
$newString = str_ireplace("hello", "Hi", $string);

echo $newString; // Output: Hi World