To find the number of elements in a PHP $array, which is faster/better/stronger?
$array
count($array) or sizeof($array) ?
count($array)
sizeof($array)
According to the website, sizeof() is an alias of count(), so they should be running the same code. Perhaps sizeof() has a little bit of overhead because it needs to resolve it to count()? It should be very minimal though.
sizeof()
count()