Arr::getDepth(array $array): int
Get nesting depth of an array
Arr::getDepth([]) -> 1 Arr::getDepth([1, 2, 3]) -> 1 Arr::getDepth([1, 2 => [], 3]) -> 2 Arr::getDepth([ 1, 2 => [ 3 => [ 4 => [] ] ], 5 => [] ]) -> 4
Last updated 5 years ago