public static function replace(
        $input,
        $search,
        $replace,
        $caseInsensitive = false,
        $encoding = self::DEFAULT_ENCODING,
        &$count = null
    ) {
        return function_exists('mb_strlen')
            ? static::mbStrReplaceCaller($search, $replace, $input, $caseInsensitive, $encoding, $count)
            : (($caseInsensitive)
                ? (str_ireplace($search, $replace, $input, $count)) // @codeCoverageIgnore
                // excluded as reaching this line is environment dependent.
                : (str_replace($search, $replace, $input, $count)));
    }