public function checkTags($expectTags, $tag = null) { if ($tag === null) { $tag = $this->stream->getc(); } if (!strchr($expectTags, $tag)) { throw $this->unexpectedTag($tag, $expectTags); } return $tag; }