src/Utils/IterableUtils.php
public static function find(array $arr, callable $callback)
    {
        foreach ($arr as $index => $value) {
            if ($callback($value, $index) === true) {
                return $value;
            }
        }

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

        return null;
    }
public static function find ( array $ arr , callable $ callback ) { foreach ( $ arr as $ index => $ value ) { if ( $ callback ( $ value , $ index ) === true ) { return $ value ; } } return null ; }
Find a value in array. Return the first found

@param array $arr The array to be used
@param callable $callback Function fired in array elements
@return mixed
Find a value in array . Return the first found