public static function lastIndexOf(array $array, callable $predicate) : int
    {
        for ($index = count($array) - 1; $index >= 0; --$index) {
            if ($predicate($array[$index])) {
                return $index;
            }
        }

        return -1;
    }
public static function lastIndexOf(array $array, callable $predicate) : int
    {
        for ($index = count($array) - 1; $index >= 0; --$index) {
            if ($predicate($array[$index])) {
                return $index;
            }
        }

        return -1;
    }
public static function lastIndexOf ( array $ array , callable $ predicate ) : int { for ( $ index = count ( $ array ) - 1 ; $ index >= 0 ; -- $ index ) { if ( $ predicate ( $ array [ $ index ] ) ) { return $ index ; } } return - 1 ; }
Returns index of last element of the array for which predicate is true. Returns -1 if none.

@param array $array
@param callable $predicate

@return int
Returns index of last element of the array for which predicate is true . Returns - 1 if none .