|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-12 15:24 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Description: ------------ The LimitIterator doesn't seem to follow the Iterator contract: It's not possible to iterate using the Iterator methods. Reproduce code: --------------- $limitIterator = new LimitIterator(new ArrayIterator(array('foo'))); $arrayIterator = new ArrayIterator(array('foo')); $limitItValue = $limitIterator->current(); $arrayItValue = $arrayIterator->current(); Expected result: ---------------- $limitItValue and $arrayItValue to be equal (both 'foo') Actual result: -------------- $limitItValue ends up being NULL, while $arrayItValue has the expected value 'foo'.