This function determines whether the provided value is of type list or tuple or not. The functions is_list and is_tuple can be used to check if the array is mutable.
This function does not generate a change.
is_array(value)
Argument | Type | Description |
---|---|---|
value | any (required) | The value to be tested. |
Returns true
if the value passed is an array, else it returns false
.
This code shows some return values for is_array():
[
is_array( [] ),
is_array( tmp = [['nested']] ),
is_array( tmp[0] ),
];
Return value in JSON format
[
true,
true,
true
]