SPL-StandardPHPLibrary
Traversable Interface Reference
Inheritance diagram for Traversable:
Inheritance graph
Collaboration diagram for Traversable:
Collaboration graph

Detailed Description

Interface to detect a class is traversable using foreach.

Since
PHP 5.0

Abstract base interface that cannot be implemented alone. Instead it must be implemented by either IteratorAggregate or Iterator.

Note
Internal classes that implement this interface can be used in a foreach construct and do not need to implement IteratorAggregate or Iterator.
This is an engine internal interface which cannot be implemented in PHP scripts. Either IteratorAggregate or Iterator must be used instead.

Definition at line 523 of file spl.php.


The documentation for this interface was generated from the following file: