What advantage does using str_ireplace offer over preg_replace in this context?

Using `str_ireplace` offers the advantage of being case-insensitive when replacing a string within another string. This means that it will replace the specified substring regardless of the case of the letters. This can be useful when you want to replace a string in a case-insensitive manner without having to use regular expressions like in `preg_replace`.

// Using str_ireplace to replace a string case-insensitively
$string = "Hello World";
$newString = str_ireplace("hello", "Hi", $string);
echo $newString; // Output: Hi World