Table of Contents

function is_traversable()

Prototype

bool is_traversable(mixed $list)

Example implementation

function is_traversable($iterator)
{
    return is_array($iterator) or $iterator instanceof Traversable;
}