src/Zicht/Itertools/lib/Traits/LastTrait.php
public function lastKey($default = null)
    {
        if ($this instanceof \Iterator) {
            $key = $default;
            foreach ($this as $key => $value) {
            }
            return $key;
        }

        return null;
    }
public function lastKey($default = null)
    {
        if ($this instanceof \Iterator) {
            $key = $default;
            foreach ($this as $key => $value) {
            }
            return $key;
        }

        return null;
    }
Returns the key of the last element of this iterable or
returns $DEFAULT when this iterable is empty

@param mixed $default
@return mixed