public static function isTraversable($value)
    {
        return is_array($value) || (is_object($value) &&  (get_class($value) == 'stdClass' || $value instanceof \Traversable));
    }
public static function isTraversable($value)
    {
        return is_array($value) || (is_object($value) &&  (get_class($value) == 'stdClass' || $value instanceof \Traversable));
    }
public static function isTraversable ( $ value ) { return is_array ( $ value ) || ( is_object ( $ value ) && ( get_class ( $ value ) == 'stdClass' || $ value instanceof \ Traversable ) ) ; }
Determine if the value can be traversed with foreach.

@param mixed $value
Variable to be examined.

@return bool
TRUE if $value can be traversed with foreach.
Determine if the value can be traversed with foreach .