> 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/utility-methods/getdepth.md).

# getDepth

#### Definition

```php
Arr::getDepth(array $array): int
```

#### Description

Get nesting depth of an array

#### Examples

```php
Arr::getDepth([]) -> 1

Arr::getDepth([1, 2, 3]) -> 1

Arr::getDepth([1, 2 => [], 3]) -> 2

Arr::getDepth([
    1, 
    2 => [
        3 => [
            4 => []
        ]
    ], 
    5 => []
]) -> 4
```
