It's just a case of lazy evaluation. if $ret is false, then $ret = $ret && foo()
will never evaluate foo. The loop will execute 10 times, but the function call only as long as $ret is true.
MattEvans commented: Thanks for the tip. +2
Infarction 503 Posting Virtuoso