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
548k questions
547k answers
4 comments
86.3k users