RemexHtml/TreeBuilder/TreeBuilder.php
public function generateImpliedEndTagsAndPop( $name, $sourceStart, $sourceLength ) {
		$this->generateImpliedEndTags( $name, $sourceStart );
		if ( $this->stack->current->htmlName !== $name ) {
			$this->error( "found </$name> but elements are open that cannot " .
				"have implied end tags, closing them", $sourceStart );
		}
		$this->popAllUpToName( $name, $sourceStart, $sourceLength );
	}
public function generateImpliedEndTagsAndPop( $name, $sourceStart, $sourceLength ) {
		$this->generateImpliedEndTags( $name, $sourceStart );
		if ( $this->stack->current->htmlName !== $name ) {
			$this->error( "found </$name> but elements are open that cannot " .
				"have implied end tags, closing them", $sourceStart );
		}
		$this->popAllUpToName( $name, $sourceStart, $sourceLength );
	}
public function generateImpliedEndTagsAndPop ( $ name , $ sourceStart , $ sourceLength ) { $ this -> generateImpliedEndTags ( $ name , $ sourceStart ) ; if ( $ this -> stack -> current -> htmlName !== $ name ) { $ this -> error ( "found </$name> but elements are open that cannot " . "have implied end tags, closing them" , $ sourceStart ) ; } $ this -> popAllUpToName ( $ name , $ sourceStart , $ sourceLength ) ; }
Generate implied end tags, with an element to exclude, and if the
current element is not now the named excluded element, raise an error.
Then, pop all elements until an element with the name is popped from
the list.

@param string $name The name to exclude
@param int $sourceStart
@param int $sourceLength
Generate implied end tags with an element to exclude and if the current element is not now the named excluded element raise an error . Then pop all elements until an element with the name is popped from the list .