On Thu, 23 Jan 2003, Ford, Mike               [LSS] wrote:

> > -----Original Message-----
> > From: Philip Olson [mailto:[EMAIL PROTECTED]]
> > Sent: 23 January 2003 19:02
> > 
> >  After your post I've realized that
> > the problems people experienced has nothing to do with
> > the function but only because the introduction of that
> > call time reference warning.
> 
> Ah, that makes sense; it may also have been caused by the phenomenon
> we've been seeing in other areas of people unexpectedly having
> error_reporting set to E_ALL for them on recent upgrades!
> 
> >  Essentially, the proto
> > in the docs (and php4 source) are wrong and people
> > followed this wrong advice.  These protos are all that
> > needed changing.
> 
> No, again here I can't agree; the protos reflect the fact that the
> function accepts its argument by reference -- it's the equivalent of
> writing a {PHP function that is defined as:
> 
>    function OCIFetchInto($stmt_resource, &$results) { ... }
> 
> The proto, as I understand it, is a statement of how the function is
> defined, and so here the & *should* be present to show that the
> function always takes the $results variable by reference.  Otherwise,
> the proto would be at variance with the statement that the results are
> returned in that argument!  If any clarification is needed, it's about
> what this usage of & actually means.

You're of course correct, not sure what I was thinking. *sigh*
Other function keep the & in the proto and are not used
at call time.  headers_sent() is a recent example.  Anyway yes
the & should be there as it's how the function is defined.  It
will help make sense to all users if examples are provided.

Thanks for your comments again and correcting my mistakes :)

Regards,
Philip


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to