src/Template/Tokenizer/Token/Element.php
private function parseElementName(string $html): string
    {
        $html = \trim($html);
        $elementMatchSuccessful = \preg_match(
            "/^(<(([a-z0-9\-]+:)?[a-z0-9\-]+))/i",
            $html,
            $elementMatches
        );
        if ($elementMatchSuccessful !== 1) {
            if ($this->getThrowOnError()) {
                throw new ParseException('Invalid element name. Truncated html = ' . \mb_substr($html, 0, 20));
            }

            return '';
        }

        return \mb_strtolower($elementMatches[2]);
    }
private function parseElementName(string $html): string
    {
        $html = \trim($html);
        $elementMatchSuccessful = \preg_match(
            "/^(<(([a-z0-9\-]+:)?[a-z0-9\-]+))/i",
            $html,
            $elementMatches
        );
        if ($elementMatchSuccessful !== 1) {
            if ($this->getThrowOnError()) {
                throw new ParseException('Invalid element name. Truncated html = ' . \mb_substr($html, 0, 20));
            }

            return '';
        }

        return \mb_strtolower($elementMatches[2]);
    }
private function parseElementName ( string $ html ) : string { $ html = \ trim ( $ html ) ; $ elementMatchSuccessful = \ preg_match ( "/^(<(([a-z0-9\-]+:)?[a-z0-9\-]+))/i" , $ html , $ elementMatches ) ; if ( $ elementMatchSuccessful !== 1 ) { if ( $ this -> getThrowOnError ( ) ) { throw new ParseException ( 'Invalid element name. Truncated html = ' . \ mb_substr ( $ html , 0 , 20 ) ) ; } return '' ; } return \ mb_strtolower ( $ elementMatches [ 2 ] ) ; }
Will get the element name from the html string.

@param $html string

@return string The element name.
Will get the element name from the html string .