Re: Using Arrays in PHP Hi Explizite,
There is some difference there, just check it below,
They can both be used to count the number of items in an array but does one do it better? sizeof vs count
sizeof: 3.75928902626 seconds
count: 3.33035206795 seconds
Time saved: 0.428936958313 seconds; 12.8796280262%
The evidence says yes. The count function was over 12% faster in this test. Both functions are fast though taking 3-4 microseconds to count an array with 100,000 items. You might think it isn't worth it but remember count is also a character shorter. Not only is it faster to run but it is also faster to type!
__________________ Thanks & Regards
Sabari... |