PHP is_iterable() Function

PHP Variable Handling Reference : Check whether the contents of a variable is an iterable value or not

Definition and Usage

The is_iterable() function checks whether the contents of a variable is an iterable value or not.

This function returns true (1) if the variable is iterable, otherwise it returns false/nothing.

Syntax

is_iterable(variable);

Parameter Values

Parameter Description
variable Required. Specifies the variable to check

Technical Details

Return Value: TRUE if variable is iterable, FALSE otherwise
Return Type: Boolean
PHP Version: 7.1+

❮ PHP Variable Handling Reference