compilePatternAsRegex using $this in static call