public static function last(array $arr, callable $callback)
    {
        $arrLength = count($arr);

        if ($arrLength === 0) {
            return null;
        }

        $index = $arrLength - 1;

        while($index >= 0) {
            if ($callback($arr[$index], $index) === true) {
                return $arr[$index];
            }
            $index--;
        }

        return null;
    }