In the updates to PHP 7.2+, using count() as demonstrated above will emit a warning message.
An E_WARNING will now be emitted when attempting to count() non-countable types (this includes the sizeof() alias function).
Warning: count(): Parameter must be an array or an object that implements Countable
In the updates to PHP 7.2+, using count() as demonstrated above will emit a warning message. An E_WARNING will now be emitted when attempting to count() non-countable types (this includes the sizeof() alias function). Warning: count(): Parameter must be an array or an object that implements Countable