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
1.4m articles
1.4m replys
5 comments
57.0k users