Replaces all occurrences of $pattern in $str by $replacement. An alias for mb_ereg_replace(). Note that the 'i' option with multibyte patterns in mb_ereg_replace() requires PHP 5.6+ for correct results. This is due to a lack of support in the bundled version of Oniguruma in PHP < 5.6, and current versions of HHVM (3.8 and below).
public regexReplace ( string $pattern, string $replacement, string $options = 'msr' ) :
|$pattern||string||The regular expression pattern|
|$replacement||string||The string to replace with|
|$options||string||Matching conditions to be used|
|return||Object with the resulting $str after the replacements|