- count: documentation ( source)
- error_reporting: documentation ( source)
<?php
error_reporting(-1);
class C implements Countable { function count() { return 10; } }
$c = new C;
echo '<pre>';
echo 'standard: ', count($c), "\n";
echo '"recursive": ', count(array($c), COUNT_RECURSIVE), "\n";
echo '"recursive": ', count(array(new stdClass()), COUNT_RECURSIVE), "\n";
echo '</pre>';