RE: [PHP] Best practice question
| From: | Ford, Mike [LSS] | Date: | Fri, 20 Sep 2002 12:28:59 +0000 |
| Subject: | RE: [PHP] Best practice question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117006@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Jon Haworth [mailto:jhaworth@witanjardine.co.uk]
> Sent: 19 September 2002 18:18
>
> What are peoples' thoughts on "one should always return a value from a
> function, even if it's always going to be true"?
Unprintable!!
There's no point in returning a value if there's no sensible value to return.
Confusion can arise because PHP uses "function" for what, in some other languages, are
distinguished into "functions" (which must return a value) and "subroutines"
(which cannot). Anyone insisting that a function must return a result have probably been exposed
only (or primarily) to such languages ;-Z !!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211