isNested

Definition

1
Arr::isNested(array $array): bool
Copied!

Description

Check if any element of an array is also an array

Examples

1
Arr::isNested([]) -> false
2
3
Arr::isNested([1, 2, 3]) -> false
4
5
Arr::isNested([1, 2 => [], 3]) -> true
6
7
Arr::isNested([1, 2 => [[[]]], 3 => []]) -> true
Copied!
Last modified 2yr ago
Copy link