Re: Proto void and return values...
| From: | Maxim Maletsky | Date: | Wed, 13 Nov 2002 02:45:32 +0000 |
| Subject: | Re: Proto void and return values... | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-90928@lists.php.net to get a copy of this message | ||
Most of them (70% ?) are actually having wrong protos in docs.
I refer to the ones that return boolean (like phpinfo() for instance)
but documented as returning an integer. This is not really a huge issue,
but does make confusion because of the kind of functions that MUST
return true of false (is_link() for example).
--
Maxim Maletsky
maxim@php.net
On 12 Nov 2002 22:59:50 +0100 Zak Greant <zak@mysql.com> wrote:
> On Tue, 2002-11-12 at 20:25, David Brown wrote:
> > On Tue, Nov 12, 2002 at 02:16:41PM -0500, David Brown wrote:
> > | Hi everyone:
> > |
> > | For functions prototyped as returning void, return values seem to be applied
> > | at random. Some functions, such as trigger_error/user_error, srand, ob_start,
> > | and phpinfo, use RETURN_TRUE. The vast majority of these functions just fall
> > | through, implicitly returning NULL to userland.
> >
> > Or perhaps I'v just thought about this entirely too long. Is it possible
> > that the prototypes are just wrong in the documentation?
>
> Bingo! :) (or at least, that is my belief - I might be wrong :)
>
> --zak
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>