note 99226 deleted from class.iteratoraggregate by danbrown
| From: | danbrown@php.net | Date: | Thu, 05 Aug 2010 03:56:43 +0000 |
| Subject: | note 99226 deleted from class.iteratoraggregate by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171378@lists.php.net to get a copy of this message | ||
Note Submitter: tmont
----
Note that you cannot have a class that implements both Iterator and IteratorAggregate. I'm sure
the reason is non-ludicrous, but I can't imagine what that might be.
> php -r "class Foo implements Iterator, IteratorAggregate {}"
> Fatal error: Class Foo cannot implement both IteratorAggregate and Iterator at the same time
They should add a trollface to the end of that error message.