Performance - function called in condition part of loop
Sample code:
for ($i = 0; $i < count($arr); $i++) // Performance - function called in condition part of loop
//...
You included function call inside condition checking part of loop. This can degrade performance of your application and recommended way to handle this is to create some temporary variable to hold function's return value.
$cnt = $count($arr);
for ($i = 0; $i < $cnt; $i++)
//...

