Re: first php 5 class
| From: | Richard Lynch | Date: | Thu, 31 Jan 2008 18:37:14 +0000 |
| Subject: | Re: first php 5 class | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268482@lists.php.net to get a copy of this message | ||
On Wed, January 30, 2008 9:42 pm, Nathan Nobbe wrote:
> On Jan 30, 2008 7:58 PM, Richard Lynch <ceo@l-i-e.com> wrote:
>> I don't use SPL because it makes my head spin to read it, and I
>> never
>> ever try to do something as silly as iterate over a *LARGE* array in
>> end-user pages.
>
> are there pages where you iterate over the same 'small' array more
> than
> once?
No.
> spl will definitely beat out the foreach performance over the
> arrays.
The performance is irrelevant unless it's the bottleneck, which it's not.
> its really not that bad to learn, and once you have it down, its so
> easy.
> you can decorate one thing w/ another to get new behavior at runtime.
> suppose you have a structure, you want to get some stuff out of it.
> ok,
> iterate over it, but wait you dont want all of it, wrap it in a
> FilterIterator,
> but wait, you might need those results again, wrap it in a
> CachingIterator.
> not only is the library seamless, but its faster than the stock stuff.
> and
> it has lots of other useful features as well, besides the iterators.
I tried several times to use SPL and SPL-like frameworks.
I always felt confused by the names, no matter how long I used them...
"You are in a maze of twisty dark passages, all alike."
:-)
ymmv
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?