str_ireplace($search, $replace, $subject, &$count);
// Example 1: Simple replacement $input = "Hello World!"; $output = str_ireplace("world", "PHP", $input); echo $output; // "Hello PHP!" // Example 2: Replacing multiple occurrences $input = "Hello hello hello!"; $output = str_ireplace("hello", "Goodbye", $input, $count); echo $output; // "Goodbye Goodbye Goodbye!" echo $count; // 3 // Example 3: Using an array as search and replace arguments $input = "The quick brown fox jumps over the lazy dog."; $search = array("quick", "brown", "fox", "lazy", "dog"); $replace = array("slow", "black", "horse", "energetic", "cat"); $output = str_ireplace($search, $replace, $input); echo $output; // "The slow black horse jumps over the energetic cat."In the examples above, we can see that the `str_ireplace` function is used to replace substrings in a given input string. It is case-insensitive, meaning it will replace occurrences of the substring regardless of case. The library package for this function is the Joomla String library.