Re: Printing within functions

From: Date: Tue, 13 Nov 2007 00:22:53 +0000
Subject: Re: Printing within functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-264405@lists.php.net to get a copy of this message
Obviously, these are over-simplified functions, but you get the point. Nonetheless, do you tend to print things within functions or pass the results back and then print them? I understand it may depend on the current context, but which way do you lean and is one way or the other considered *better practice*?
I'd say 98% of the time I return a value back so I can verify the result. You could verify the result within the function, but that would cause the function to become less portable, and most of the time I use the same function in more than one place, or try to. Jake

« previous php.general (#264405) next »