public function __construct($pattern, $subject) { $this->pattern = str_replace('/', '\\/', $pattern); $this->subject = $subject; }