1

PHP Traversable type hint i read this topic but i'm still confused about traversable, anyone can explain to me? and explain about this function

function MyFunction($traversable)
{
  if(!$traversable instanceof Traversable && !is_array($traversable))
  {
    throw new InvalidArgumentException(sprintf(
        'Myfunction($traversable = %s): Invalid argument $traversable.'
        ,var_export($traversable, true)
   ));
 }
}

thanks

Community
  • 1
  • 1

0 Answers0