Re: count() doesn't work on overloaded objects
| From: | George Schlossnagle | Date: | Fri, 23 Apr 2004 13:32:32 +0000 |
| Subject: | Re: count() doesn't work on overloaded objects | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9519@lists.php.net to get a copy of this message | ||
On Apr 23, 2004, at 9:24 AM, Wez Furlong wrote:
While solving http://bugs.php.net/bug.php?id=27974, we've discovered that count() on an overloaded object (in this case, a variant object representing an OLE SafeArray) doesn't return a truthful value. What, if anything, are we going to do about that? 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 talked about this with Marcus a few months ago. I think that objects which implement the necessary interfaces should work as arrays in all the standard array functions. Marcus had an old patch for this that I would be happy to help update if people are keen on this idea. George