Re: SPL Countable count() not being called
| From: | Stut | Date: | Tue, 30 Aug 2005 16:05:17 +0000 |
| Subject: | Re: SPL Countable count() not being called | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221601@lists.php.net to get a copy of this message | ||
Justin Francis wrote:
Stut wrote:Aha, gotcha. Thanks. -StutShould it not be $c->count() ? -StutNo. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c->count(). This is so the object can be treated like a countable array in the same manner.