Re: Re: Only variables can be passed by reference

From: Date: Thu, 04 Dec 2014 23:14:31 +0000
Subject: Re: Re: Only variables can be passed by reference
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-79432@lists.php.net to get a copy of this message
> Even when there is parameter to pass, user has to create variable always. > > select_select([$a], [$b], [$c], 10); > > fails with E_ERROR, while > > $x = [$a]; > $y = [$b]; > $z = [$c]; > stream_select($x, $y, $z, 10); > > works, but It does not look nice. From the documentation: "Also do not forget that those arrays are passed by reference and will be modified after stream_select() returns." These modify by reference; ignoring this is almost *certainly* a bug on your part.

« previous php.internals (#79432) next »