<?php
/**
* Just added as comment to php documentation
* http://us3.php.net/manual/en/countable.count.php
*/
class Foo implements Countable
{
public function count()
{
dump(func_get_args());
return 1;
}
}
// recursive parameter doesn't affect Countable
echo count(new Foo(), COUNT_RECURSIVE);
^ []