Skip to content
Advertisement

Tag: php-7.2

count() emitting an E_WARNING

Prior to PHP 7.2 using count() on a scalar value or non-countable object would return 1 or 0. For example: https://3v4l.org/tGRDE var_dump(count(123)); //int(1) var_dump(count(new stdclass)); //int(…

Advertisement