public function popKey()
    {
        if (strlen($this->base)) {
            $layers = explode($this->delimiter, $this->base);
            $last = count($layers) - 1;
            $layer = $layers[$last];
            if ($last > 0) {
                unset ($layers[$last]);
                $this->base = implode($this->delimiter, $layers);
            } else {
                $this->base = '';
            }
            return $layer;
        }

        return null;
    }
public function popKey()
    {
        if (strlen($this->base)) {
            $layers = explode($this->delimiter, $this->base);
            $last = count($layers) - 1;
            $layer = $layers[$last];
            if ($last > 0) {
                unset ($layers[$last]);
                $this->base = implode($this->delimiter, $layers);
            } else {
                $this->base = '';
            }
            return $layer;
        }

        return null;
    }
public function popKey ( ) { if ( strlen ( $ this -> base ) ) { $ layers = explode ( $ this -> delimiter , $ this -> base ) ; $ last = count ( $ layers ) - 1 ; $ layer = $ layers [ $ last ] ; if ( $ last > 0 ) { unset ( $ layers [ $ last ] ) ; $ this -> base = implode ( $ this -> delimiter , $ layers ) ; } else { $ this -> base = '' ; } return $ layer ; } return null ; }
Remove a layer of depth from the key hierarchy

@return string|null The layer that was removed from the hierarchy (`NULL`
if no layers exist)
Remove a layer of depth from the key hierarchy