Re: Warning about passing argumensts by reference

From: Date: Tue, 25 Nov 2003 19:37:30 +0000
Subject: Re: Warning about passing argumensts by reference
References: 1 2 3  Groups: php.internals php.pecl.dev 
Request: Send a blank email to pecl-dev+get-232@lists.php.net to get a copy of this message
> Ah, I thought there was something missing in functions like flock that > have an argument to be passed by reference but they do not declare it as > such. > > Does that apply also to when the arguement to be passed by reference is > optional? > > If so, am I right to assume that the function entry for flock in > ext/standard/basic_functions.c is incorrect? > > PHP_FE(flock, NULL) > > The prototype of flock in ext/standard/file.c is: > > /* {{{ proto bool flock(resource fp, int operation [, int &wouldblock]) > Interresting, flock()'s third parameter is absolutely useless if it's not passed by reference (all the code explicitly checks for PZVAL_IS_REF(arg3) and ignores if it's not), does anyone with historical knowledge of this function have an idea why this arg isn't force by ref? Unless I'm missing something off-the-wall, it looks like a bug fix for the 4_3 branch. -Sara

« previous php.pecl.dev (#232) next »