facebook/hhvm — pull request #2931 by SiebelsTim (2014-06-13 08:48:44+00:00)
Title: Don't call begin/endIteration on every call

PHP doesn't call beginIteration when you call rewind() twice.
It only calls it if it really is the begin of an Iteration.
Same for endIteration in valid().
If you already reached the end and call it again, it doesn't call endIteration

Fixed at least zend/bad/iterator_025.php