Function returns
| From: | Shawn McKenzie | Date: | Sun, 11 Jan 2004 22:59:48 +0000 |
| Subject: | Function returns | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-174260@lists.php.net to get a copy of this message | ||
Maybe a dumb question, but as good coding practice, should all functions
return something even if they don't need to???
Example:
function do_it()
{
echo "hi";
}
--or--
function do_it()
{
return echo "hi";
}
Also, if they do other things but really don't return anything, should they
return true maybe???
Just curious!
-Shawn