Both are used to count elements in a array.sizeof() function is an alias of count() function used in PHP. count() function is faster and butter than sizeof().

Example

                                        

$array = array('1','2','3','4');
$size = count($array);

//OUTPUT : 4

Suggest An Answer

No suggestions avaliable!