private function printStack() {
        $names = array();
        foreach ($this->stack as $i => $element) {
            $names[] = $element->tagName;
        }
        echo "  -> stack [" . implode(', ', $names) . "]\n";
    }
private function printStack() {
        $names = array();
        foreach ($this->stack as $i => $element) {
            $names[] = $element->tagName;
        }
        echo "  -> stack [" . implode(', ', $names) . "]\n";
    }
private function printStack ( ) { $ names = array ( ) ; foreach ( $ this -> stack as $ i => $ element ) { $ names [ ] = $ element -> tagName ; } echo "  -> stack [" . implode ( ', ' , $ names ) . "]\n" ; }
For debugging, prints the stack
For debugging prints the stack