Added new method - isNested and getDepth
isNested
Check if any element of an array is also an array.
For example [1, 2, 3]
is a regular array so it isn't nested and [1, 2 => [], 3]
has another array as one of it's elements so it is nested.
getDepth
Get nesting depth of an array.
Taking example from above, [1, 2, 3]
is a regular array so it has depth of 1 and [1, 2 => [], 3]
has depth of 2 because of a second array in it. More detailed examples showing more complex cases can be found in documentation.