> For the complete documentation index, see [llms.txt](https://minwork.gitbook.io/array/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minwork.gitbook.io/array/common-methods/has.md).

# has

#### Definition

```php
Arr::has(array $array, mixed $keys): bool
```

#### Description

Check if specified (nested) key(s) exists in array

{% hint style="info" %}
`$keys` argument is parsed using [getKeysArray ](/array/common-methods/getkeysarray.md)method
{% endhint %}

#### Examples

```php
$array = [
    'foo' => [
        1,
        'test' => [
            'abc' => 2,
            'def'
        ],
        [
            'bar' => true
        ],
    ],
];

Arr::has($array, 'foo') -> true
Arr::has($array, 'foo.0') -> true
Arr::has($array, 'foo.test') -> true
Arr::has($array, 'foo.test.abc') -> true
Arr::has($array, ['foo', 1, 'bar']) -> true

Arr::has($array, 'test') -> false
Arr::has($array, []) -> false
Arr::has($array, 'not.existing.key') -> false
```
