Re: Multiple return statements in a function.
| From: | Richard Heyes | Date: | Fri, 24 Apr 2009 08:59:13 +0000 |
| Subject: | Re: Multiple return statements in a function. | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291909@lists.php.net to get a copy of this message | ||
Hi,
> your function could be condensed to this:
>
> function check($a)
> {
> return is_array($a) ? true : false;
> }
Or even better, this:
function check($a)
{
return is_array($a);
}
Not that I'd imagine it makes a great deal of difference.
--
Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net)
PHP mail: RMail (www.phpguru.org/rmail)
PHP datagrid: RGrid (www.phpguru.org/rgrid)
PHP Template: RTemplate (www.phpguru.org/rtemplate)