* Thus wrote Aidan Lister ([EMAIL PROTECTED]): > How _should_ this be done? In terms of "best practice". > > <?php > function foobar () > { > return new SomeObject; > } > ?> > > Or: > > <?php > function barfoo () > { > $tempvar = new SomeObject; > return $tempvar > } > ?>
I'm not exactly sure what your looking for, this is like asking what is better: $a = 'foo'; echo $a; or echo 'foo'; if tou want my opinion it should be written like this: <?php /* * Create an instance of SomeObject */ function foobar() { return new SomeObject; } > Please don't reply if you really, really don't know what you are talking > about. What kind of requirement is this? Anyone can reply your email and they will do so if they feel like it. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php