downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

IteratorAggregate> <Iterator::rewind
Last updated: Fri, 20 Nov 2009

view this page in

Iterator::valid

(PHP 5 >= 5.1.0)

Iterator::validChecks if current position is valid

Description

abstract public boolean Iterator::valid ( void )

This method is called after Iterator::rewind and Iterator::next to check if the current position is valid.

Parameters

This function has no parameters.

Return Values

The return value will be casted to boolean and then evaluated. Returns TRUE on success or FALSE on failure.



add a note add a note User Contributed Notes
Iterator::valid
seva dot lapsha at gmail dot com
01-Aug-2009 11:19
If <? Iterator::valid() ?> returns <? false ?>, the <? foreach() ?> loop will be terminated.

IteratorAggregate> <Iterator::rewind
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites