Multiget/intelligent generic PHP wrapper function... thoughts/advice wanted

mike mike503 at gmail.com
Sat Nov 3 05:47:37 UTC 2007


Yeah, apologies to all for going a little deeper OT.

I was planning on replying just to Chris, but thought I'd keep it in
on the list in case someone else cared.

Thanks for the pointers Chris, I am going with this code for now
(using the $dontcare=>$key in the loop) and will see how the app
works.

On 11/2/07, Chris Goffinet <goffinet at yahoo-inc.com> wrote:
> Yes I know that, hoping you could fix the code with the $key=>$value
> change.
>
>
> Array_keys is not clean because your simply calling an unneeded
> function on an already good array? Why on earth would you waste
> overhead (O(n)) when its simply on same line? ... I think this
> discussion has went really off topic as its not relating to memcache
> but more PHP.
>
>
> Chris Goffinet
> goffinet at yahoo-inc.com
>
>
>
> On Nov 2, 2007, at 10:28 PM, mike wrote:
>
> > On 11/2/07, Chris Goffinet <goffinet at yahoo-inc.com> wrote:
> >> The array_values is not needed, its already an array. Just set it up
> >> as $key=>$value and do not do extra overhead.
> >
> > Actually it would be:
> >
> > foreach($keys as $dontcare => $key) {
> >
> > But wouldn't
> >
> > foreach(array_keys($keys) as $key) { be just as clean?
>
>


More information about the memcached mailing list