Just wanna say thanks for the comments. I've since realized from looking at the Zend Framework, which aspires to high standards, that they certainly do use the return-as-soon-as-you-figure-it-out approach in method definitions that are pretty short, and it's extremely clear reading.
If we look closer we'll probably find that they have the most likely ifs before the less likely. So I'd say this approach is optimal from every point of view. On Sat, Mar 16, 2013 at 12:23 PM, Federico Ulfo <rainelemen...@gmail.com>wrote: > +1 for the first, because -3 lines of code -1 variable, but really either > are good. > > > -- David Mintz http://davidmintz.org/ Fight for social equality: http://socialequality.com/
_______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show-participation