src/Bag.php
public function findLastKey(callable $predicate, $fromIndex = null)
    {
        foreach ($this->iterateReverseFromIndex($fromIndex) as $key => $value) {
            if ($predicate($value, $key)) {
                return $key;
            }
        }

        return null;
    }
public function findLastKey(callable $predicate, $fromIndex = null)
    {
        foreach ($this->iterateReverseFromIndex($fromIndex) as $key => $value) {
            if ($predicate($value, $key)) {
                return $key;
            }
        }

        return null;
    }
public function findLastKey ( callable $ predicate , $ fromIndex = null ) { foreach ( $ this -> iterateReverseFromIndex ( $ fromIndex ) as $ key => $ value ) { if ( $ predicate ( $ value , $ key ) ) { return $ key ; } } return null ; }
Returns the last key that matches the `$predicate` or null.

@param callable $predicate Function is passed `($value, $key)`
@param int      $fromIndex The starting index to search from.
Can be negative to start from that far from the end of the array.
If index is out of bounds, it will be moved to first/last index.

@return mixed|null
Returns the last key that matches the $predicate or null .