WpOrg\Requests\Utility

InputValidator::is_iterable()public staticWP 1.0

Verify whether a received input parameter is "iterable".

Method of the class: InputValidator{}

No Hooks.

Return

true|false.

Usage

$result = InputValidator::is_iterable( $input );
$input(mixed) (required)
Input parameter to verify.

InputValidator::is_iterable() code WP 6.6.2

public static function is_iterable($input) {
	return is_array($input) || $input instanceof Traversable;
}