is_iterable( mixed $var )

Polyfill for is_iterable() function added in PHP 7.1 or WP 4.9.6.


Description Description

Verify that the content of a variable is an array or an object implementing the Traversable interface.


Parameters Parameters

$var

(Required) The value to check.


Top ↑

Return Return

(bool) True if $var is iterable, false otherwise.


Top ↑

Source Source

File: includes/misc-functions.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
2.9.17 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.