Do you know why <?= count(false) ?> returns 1?
<?= count(false) ?>
1
It's specified behavior:
If var is not an array or an object with implemented Countable interface, 1 will be returned.
According to http://php.net/manual/en/function.count.php
2.1m questions
2.1m answers
60 comments
57.0k users