Re: count() doesn't work on overloaded objects

From: Date: Fri, 23 Apr 2004 14:33:47 +0000
Subject: Re: count() doesn't work on overloaded objects
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-9505@lists.php.net to get a copy of this message
Okay. I'll release RC2 without it. There have been too many important fixes, and this seems to be an old bug. Keep me posted when you manage to nail things down. I'll talk to Zeev about count() and see what he thinks. Andi At 03:32 PM 4/23/2004 +0100, Wez Furlong wrote:
We could add a hook to the C iterator API for count(); it shouldn't have a huge impact on the rest of the engine.
I'm not sure if the Iterators API is the right place (it's an API for foreach()). I guess it could be in either the Iterators API or the Object API. What would you expect it to return as far as PPP properties is concerned? True. How about making it an optional handler along with the regular handlers for the overloaded object; if it is not present, stick with the current behaviour, otherwise, use the return value of that handler. By the way, I was holding off RC2 because of that bug you found. Any news? Can I roll RC2? I didn't get a chance to dig in yet, and I have a bit to wrap up before I can take a look at it this weekend. It would be nice to fix before RC2, but since I haven't really pinned down the precise cause, it's up to you :) --Wez.


« previous php.internals (#9505) next »