is_iterable

PHP 7 >= 7.1.0, PHP 8
is_iterable - Verify that the contents of a variable is an iterable value
Manual
Code Examples

is_iterable( mixed$value ): bool

Verify that the contents of a variable is accepted by the iterable pseudo-type, i.e. that it is either an array or an object implementing Traversable

Parameters

value

The value to check

Return Values

Returns true if value is iterable, false otherwise.

Related Functions

Example of is_iterable

Show all examples for is_iterable

PHP Version: