RE: [PHP] SPL Countable count() not being called

From: Date: Tue, 30 Aug 2005 16:11:26 +0000
Subject: RE: [PHP] SPL Countable count() not being called
Groups: php.general 
Request: Send a blank email to php-general+get-221602@lists.php.net to get a copy of this message
[snip] 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. [/snip] I was asleep earlier....if $c is not an array 1 will be returned. $c is one number (200), not an array.

« previous php.general (#221602) next »