public function peek()
    {
        $c = count($this->stack);
        if ($c == 0) {
            throw new \UnexpectedValueException("The stack is empty. You should probably peek() before the last end() call.");
        }
        $ret = $this->stack[$c -1];
        return $ret;
    }