src/Map.php
public function pop()
    {
        if (0 === count($this->array)) {
            return null;
        }

        // get the last hash of array
        end($this->array);
        $hash = key($this->array);

        // temporarily hold the element at that spot
        $element = $this->array[$hash];

        // forget it in our map and return our temporary
        $this->forget($this->hash_to_key($hash));

        return $element;
    }
public function pop()
    {
        if (0 === count($this->array)) {
            return null;
        }

        // get the last hash of array
        end($this->array);
        $hash = key($this->array);

        // temporarily hold the element at that spot
        $element = $this->array[$hash];

        // forget it in our map and return our temporary
        $this->forget($this->hash_to_key($hash));

        return $element;
    }
public function pop ( ) { if ( 0 === count ( $ this -> array ) ) { return null ; } // get the last hash of array end ( $ this -> array ) ; $ hash = key ( $ this -> array ) ; // temporarily hold the element at that spot $ element = $ this -> array [ $ hash ] ; // forget it in our map and return our temporary $ this -> forget ( $ this -> hash_to_key ( $ hash ) ) ; return $ element ; }
Treat the map as a stack and pop an element off its end.

@return mixed|null
@api
Treat the map as a stack and pop an element off its end .