sizeOf() | How To Print Length of an Array in PHP?

PHP gives us a function sizeOf() to count the length of the data stored in an array. sizeOf() is written in camel case. In sizeOf() method’s parameter, pass the array, you want to count the length of. and after that, simply print it by an echo. See the below example: Output:- 5