This was posted in the comments in the online maual
As a stand in for the missing stri_replace, use strtoupper() or strtolower() on the string to be searched.
str_replace( strtoupper("tHiS"), "that", strtoupper("This tHis thIs thiS") );
This just saves loading the regexp engine.