RE: [PHP] SPL Countable count() not being called
| From: | Jay Blanchard | Date: | Tue, 30 Aug 2005 15:49:00 +0000 |
| Subject: | RE: [PHP] SPL Countable count() not being called | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-221597@lists.php.net to get a copy of this message | ||
[snip]
class Collection implements Countable
{
public function count()
{
return 200;
}
}
$c = new Collection();
echo(count($c));
[/snip]
Shouldn't this be
echo Collection->count($c);
or something like that?