public static function where(
        $array,
        $field,
        ?string $operator = null,
        $value = null,
        bool $strict = false,
        bool $keepKey = false
    ): array {
        if (is_string($field)) {
            $operator = $operator === '=' ? '' : $operator;

            $query = [$field . rtrim(' ' . $operator) => $value];
        } elseif (is_array($field)) {
            $query = $field;
        } else {
            throw new \InvalidArgumentException('Where query must br array or string.');
        }

        return ArrayHelper::query($array, $query, $strict, $keepKey);
    }
public static function where(
        $array,
        $field,
        ?string $operator = null,
        $value = null,
        bool $strict = false,
        bool $keepKey = false
    ): array {
        if (is_string($field)) {
            $operator = $operator === '=' ? '' : $operator;

            $query = [$field . rtrim(' ' . $operator) => $value];
        } elseif (is_array($field)) {
            $query = $field;
        } else {
            throw new \InvalidArgumentException('Where query must br array or string.');
        }

        return ArrayHelper::query($array, $query, $strict, $keepKey);
    }
public static function where ( $ array , $ field , ? string $ operator = null , $ value = null , bool $ strict = false , bool $ keepKey = false ) : array { if ( is_string ( $ field ) ) { $ operator = $ operator === '=' ? '' : $ operator ; $ query = [ $ field . rtrim ( ' ' . $ operator ) => $ value ] ; } elseif ( is_array ( $ field ) ) { $ query = $ field ; } else { throw new \ InvalidArgumentException ( 'Where query must br array or string.' ) ; } return ArrayHelper :: query ( $ array , $ query , $ strict , $ keepKey ) ; }
Find value from array.

@param mixed        $array
@param string|array $field
@param string|null  $operator
@param mixed        $value
@param bool         $strict
@param bool         $keepKey

@return  array

@since  3.5.1
Find value from array .