Re: Internal iteration API

From: Date: Wed, 11 Jul 2012 23:53:51 +0000
Subject: Re: Internal iteration API
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-61147@lists.php.net to get a copy of this message
On Thu, 2012-07-12 at 01:49 +0200, Johannes Schlüter wrote: > Just picking some random example: > > * array_map() - This can be implemented using that infrastructure. > (While some might think about returning an Traversable object if > a Traversable object got put in, maybe a FilterIterator but > let's ignore that) > * array_filter() - This is almost the same as array_map() but we > can't implement it using Traversable, as current() (for good > reasons) returns no reference. I meant array_walk(). array_filter() shouldn't be an issue either. That happens, when you shorten a list of examples ... johannes

« previous php.internals (#61147) next »