Arr.php
public static function find(array $array, callable $callback, $default = null)
    {
        foreach ($array as $key => $value) {
            if ($callback($value, $key)) {
                return $value;
            }
        }

        return $default;
    }
public static function find(array $array, callable $callback, $default = null)
    {
        foreach ($array as $key => $value) {
            if ($callback($value, $key)) {
                return $value;
            }
        }

        return $default;
    }
public static function find ( array $ array , callable $ callback , $ default = null ) { foreach ( $ array as $ key => $ value ) { if ( $ callback ( $ value , $ key ) ) { return $ value ; } } return $ default ; }
Returns the first value which passes the given truth test.

Aliases:
- @see Arr::detect()

@param   array       $array      The array to traverse.
@param   callable    $callback   The truth test the value should pass.
@param   mixed       $default    The default value to be returned if none of the elements passes the test.
@return  mixed
Returns the first value which passes the given truth test .