public function __toString() { $parent = parent::__toString(); $chained = $this->chained; $captures = $this->captures; $root_chained = $this->is_chained_root ? "Root chained" : "Chained"; $str = "{$parent}, {$root_chained}: {$chained}, Captures: {$captures}"; return $str; }