private function getNextTag(&$s, $i, &$position)
    {
        $j = mb_strpos($s, '[', $i);
        $k = mb_strpos($s, ']', $j + 1);

        if ($j === false || $k === false) {
            $position = false;
            return null;
        }

        $t = mb_substr($s, $j + 1, $k - ($j + 1));
        $l = mb_strrpos($t, '[');

        if ($l !== false) {
            $j += $l + 1;
        }

        $position = $j;

        $tagString = mb_substr($s, $j, $k - $j + 1);

        return new Tag($tagString, $this->getHandlers());
    }
private function getNextTag(&$s, $i, &$position)
    {
        $j = mb_strpos($s, '[', $i);
        $k = mb_strpos($s, ']', $j + 1);

        if ($j === false || $k === false) {
            $position = false;
            return null;
        }

        $t = mb_substr($s, $j + 1, $k - ($j + 1));
        $l = mb_strrpos($t, '[');

        if ($l !== false) {
            $j += $l + 1;
        }

        $position = $j;

        $tagString = mb_substr($s, $j, $k - $j + 1);

        return new Tag($tagString, $this->getHandlers());
    }
private function getNextTag ( & $ s , $ i , & $ position ) { $ j = mb_strpos ( $ s , '[' , $ i ) ; $ k = mb_strpos ( $ s , ']' , $ j + 1 ) ; if ( $ j === false || $ k === false ) { $ position = false ; return null ; } $ t = mb_substr ( $ s , $ j + 1 , $ k - ( $ j + 1 ) ) ; $ l = mb_strrpos ( $ t , '[' ) ; if ( $ l !== false ) { $ j += $ l + 1 ; } $ position = $ j ; $ tagString = mb_substr ( $ s , $ j , $ k - $ j + 1 ) ; return new Tag ( $ tagString , $ this -> getHandlers ( ) ) ; }
Gets the next tag

@param  string $s        String to parse
@param  int    $i        Offset where search begins
@param  int    $position Will be filled with next tag's offset (FALSE if
there are no more tags)
@return Tag
Gets the next tag