public function pop($path)
    {
        $node = $this->get($path);

        if (\is_object($node)) {
            $node = get_object_vars($node);
        }

        if (!\is_array($node)) {
            throw new \UnexpectedValueException(
                sprintf(
                    'The value at path: %s should be object or array but is %s.',
                    $path,
                    \gettype($node)
                )
            );
        }

        $value = array_pop($node);

        $this->set($path, $node);

        return $value;
    }
public function pop($path)
    {
        $node = $this->get($path);

        if (\is_object($node)) {
            $node = get_object_vars($node);
        }

        if (!\is_array($node)) {
            throw new \UnexpectedValueException(
                sprintf(
                    'The value at path: %s should be object or array but is %s.',
                    $path,
                    \gettype($node)
                )
            );
        }

        $value = array_pop($node);

        $this->set($path, $node);

        return $value;
    }
public function pop ( $ path ) { $ node = $ this -> get ( $ path ) ; if ( \ is_object ( $ node ) ) { $ node = get_object_vars ( $ node ) ; } if ( ! \ is_array ( $ node ) ) { throw new \ UnexpectedValueException ( sprintf ( 'The value at path: %s should be object or array but is %s.' , $ path , \ gettype ( $ node ) ) ) ; } $ value = array_pop ( $ node ) ; $ this -> set ( $ path , $ node ) ; return $ value ; }
To remove last element from the path of this structure.

@param   string $path The structure path.

@return  mixed  The shifted value, or &null; if array is empty.
To remove last element from the path of this structure .