Re: SPL Countable count() not being called

From: 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:
Should it not be $c->count() ? -Stut
No. 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.
Aha, gotcha. Thanks. -Stut

« previous php.general (#221601) next »