MatthiasMullie\Minify\Minify::replacePattern PHP Method

replacePattern() protected method

This function will be called plenty of times, where $content will always move up 1 character.
protected replacePattern ( string $pattern, string | callable $replacement, string $content ) : string
$pattern string Pattern to match
$replacement string | callable Replacement value
$content string Content to match pattern against
return string
    protected function replacePattern($pattern, $replacement, $content)
    {
        if (is_callable($replacement)) {
            return preg_replace_callback($pattern, $replacement, $content, 1, $count);
        } else {
            return preg_replace($pattern, $replacement, $content, 1, $count);
        }
    }