PHP sizeof() Function — Tutorialio

Usage — The PHP sizeof() function is used to count all elements in an array, or something in an object. It is an alias of count().

Return Value — This function returns the number of elements in the array or an object with implemented countable interface. When the parameter is neither an array nor an object with implemented countable interface, 1 will be returned. If the array or the countable is NULL, 0 will be returned.

PHP Version and Changelog — The sizeof() function is available in PHP 4, PHP 5, PHP 7.

You can read the full post about the sizeof() function in PHP with some working examples and additional tips on