Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP is_iterable() Function

PHP is_iterable() Function

PHP Available FunctionsAvailable PHP Functions

is_iterable() The function is used to check whether a variable is an iterable value.

PHP version requirement: PHP 7 >= 7.1.0

Syntax


bool is_iterable ( mixed $var )

Parameter Description:

Return Value

If the specified variable is an iterable object, returns TRUE; otherwise returns FALSE.

Example

Example

The output is:


bool(true)
bool(true)
bool(true)
bool(false)
bool(false)

PHP Available FunctionsAvailable PHP Functions