/** * Construct regular expression result. * * @param array $matches * Matches as returned by {@see preg_matches}. * @param int[] $pos * Result position. * @param array $nextInput * Remaining input. * @param int[] $nextPos * Next position. */ public function __construct($matches, array $pos, array $nextInput, array $nextPos) { parent::__construct($matches[0][0], $pos, $nextInput, $nextPos); $this->matches = $matches; }