src/Gobie/Regex/Wrappers/Mb/MbRegex.php
private static function execReplace($pattern, $replacement, $subject, $option)
    {
        return (\is_object($replacement) || \is_array($replacement)) && \is_callable($replacement)
            ? \mb_ereg_replace_callback($pattern, $replacement, $subject, $option)
            : \mb_ereg_replace($pattern, $replacement, $subject, $option);
    }
private static function execReplace($pattern, $replacement, $subject, $option)
    {
        return (\is_object($replacement) || \is_array($replacement)) && \is_callable($replacement)
            ? \mb_ereg_replace_callback($pattern, $replacement, $subject, $option)
            : \mb_ereg_replace($pattern, $replacement, $subject, $option);
    }
Replace subject by callback or by string.

@param string          $pattern     Pattern
@param callable|string $replacement Replacement
@param string          $subject     Subject
@param string          $option      Option
@return string Replaced subject