src/Util/Arrays.php
public static function grep(array $arr, string $pattern, int $flags = 0): array
    {
        return Strings::pcre('\preg_grep', [$pattern, $arr, $flags]);
    }
public static function grep(array $arr, string $pattern, int $flags = 0): array
    {
        return Strings::pcre('\preg_grep', [$pattern, $arr, $flags]);
    }
public static function grep ( array $ arr , string $ pattern , int $ flags = 0 ) : array { return Strings :: pcre ( '\preg_grep' , [ $ pattern , $ arr , $ flags ] ) ; }
Returns array entries that match the pattern.

@param array  $arr
@param string $pattern
@param int    $flags

@return array
Returns array entries that match the pattern .