How can you make a PHP function case insensitive when replacing words?

When replacing words in a string using PHP, you can make the function case insensitive by using the `str_ireplace()` function instead of `str_replace()`. This function performs a case-insensitive search for the words to replace. This ensures that the function will replace words regardless of their case in the original string.

// Example code demonstrating how to make a PHP function case insensitive when replacing words
$string = "Hello World";
$newString = str_ireplace("hello", "Hi", $string);
echo $newString; // Output: Hi World