Re: What return type use?
| From: | Michael Wallner | Date: | Mon, 23 Feb 2004 16:40:25 +0000 |
| Subject: | Re: What return type use? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25815@lists.php.net to get a copy of this message | ||
Hi Marcos Neves, you wrote:
> suppose I have a function that return an array of something, for
> example, a list of users. if the function have to return that there's
> no users, what it should return:
> 1 - an empty array
> 2 - null
> 3 - false
> 4 - '' // empty string
> 5 - return an error
> 6 - return and raise an error
I'd go for an empty array...
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc