At 19:54 21.11.2002, Beau Hartshorne said:
[snip]
>I agree that it should return a consistent type. I was planning on
>returning a populated array on success, or a boolean false on fail.
>Instead, I will return an empty (but initialized) array on fail, and us
> I think that some of the above question might help you out. However,
> from a programming standpoint i like to make sure that my functions
> return the same type at least. Some feel different about this and
> return various type (ie, int, strings, arrays)...
I agree that it should return a cons
It depends on many issues...do you have a set standard that you use when
programming.
1. does it make sense to do it that way.
2. are there performance issue
3. is it understandable for maintenance by yourself or others.
4. does the function require a return value, if so which type.
I think that
Hi,
I'm curious if it's bad coding style for a function to return a value on
success, or simply "false" on fail. Here's what I mean:
Is this ok?
Thank you,
Beau
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
4 matches
Mail list logo