private function eregReplace($pattern, $replacement, $string, $option = 'msr')
{
static $functionExists;
if ($functionExists === null) {
$functionExists = function_exists('\\mb_split');
}
if ($functionExists) {
return \mb_ereg_replace($pattern, $replacement, $string, $option);
} else {
if ($this->supportsEncoding()) {
$option = str_replace('r', '', $option);
return \preg_replace("/{$pattern}/u{$option}", $replacement, $string);
}
}
}