src/AbstractJsonEncoder.php
public function next()
    {
        $this->initialize();

        if (!empty($this->stack)) {
            $this->step++;
            $iterator = end($this->stack);

            if ($iterator->valid()) {
                $this->processStack($iterator, end($this->stackType));
                $iterator->next();
            } else {
                $this->popStack();
            }
        } else {
            $this->step = null;
        }
    }
public function next()
    {
        $this->initialize();

        if (!empty($this->stack)) {
            $this->step++;
            $iterator = end($this->stack);

            if ($iterator->valid()) {
                $this->processStack($iterator, end($this->stackType));
                $iterator->next();
            } else {
                $this->popStack();
            }
        } else {
            $this->step = null;
        }
    }
public function next ( ) { $ this -> initialize ( ) ; if ( ! empty ( $ this -> stack ) ) { $ this -> step ++ ; $ iterator = end ( $ this -> stack ) ; if ( $ iterator -> valid ( ) ) { $ this -> processStack ( $ iterator , end ( $ this -> stackType ) ) ; $ iterator -> next ( ) ; } else { $ this -> popStack ( ) ; } } else { $ this -> step = null ; } }
Iterates the next token or tokens to the output stream.
Iterates the next token or tokens to the output stream .