Especially in PHP code for some reason or another. It's like people don't know about continue.
Don't do this!
foreach ($something as $item) { if ($item) { ... .. screenfull of code .. ... } }
Do this instead
foreach ($something as $item) { if (!$item) continue; ... .. screenfull of code .. ... }
No comments:
Post a Comment