Looks like a bug, because in PHP the method placed as a loop condition is executed within each iteration. This does not apply to foreach (there is no condition there), but applies to for and while, like here.
Szymon WMon Jul 19 17:40:47 -0400 2010
Oh, I've just read the whole method again. Well, it seems it's ok here.
Subject: un-necessary count()
http://github.com/kla/php-activerecord/blob/a9bd6e19f39f553f84f556a706cd881cc8e254db/lib/Utils.php#L53
Looks like a bug, because in PHP the method placed as a loop condition is executed within each iteration. This does not apply to foreach (there is no condition there), but applies to for and while, like here.