[wp-hackers] echo and return

Randy Peterman randy at randypeterman.com
Tue Jul 27 16:45:35 UTC 2004


But if you echo functions within yet another function are you no 
re-inventing the wheel?

I suppose that you could do
<?php
echo get_me_my_morning_paper();
?>
<?=get_me_my_morning_paper();?>
and
<?php output_get_me_my_morning_paper();?>

There are times and places where both are useful, but I am more of the 
opinion that in server side code adding to the number of functions the 
PHP engine has to parse is not optimal.  Sure, speeds are generally good 
for PHP (that's part of why we use it) but 'aerodynamics' should could 
for something in coding style.  Looking at the syntax I'd prefer the 
first two over the second.  I'm not keen un excess wrapper functions.  I 
suppose the difference between a 'white rapper' and a 'write wrapper' is 
minimal, they're just funky ;) **

Regards,

Randy Peterman

** Not trying to pull race into this, I was going for the play on 
words.  Laugh already.





More information about the hackers mailing list