Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79434 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93460 invoked from network); 4 Dec 2014 23:35:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2014 23:35:34 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.179 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.223.179 mail-ie0-f179.google.com Received: from [209.85.223.179] ([209.85.223.179:55329] helo=mail-ie0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/F3-61462-3CFE0845 for ; Thu, 04 Dec 2014 18:35:32 -0500 Received: by mail-ie0-f179.google.com with SMTP id rp18so16964803iec.10 for ; Thu, 04 Dec 2014 15:35:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=P1mQdeUJxxBGX/+r8gVQ33R7QFMq92ZDl7VFdjeQw98=; b=eDTpUIen/dfP5RCAKLMx1/xsdKr9QByshofp1avB3Bh8+P2ndiVSPYjiCcH02lyIqF DBvspgdNXHeI3NOuV3tVI+wqSA/pkJTAZIFXQj0udR8haZyU9tLqvS2VzwYVNJk1diAq fxQ6vTZ0SA+AA+2eMyR8IyvLNXi/WnyWwsEmTZFywd0JsJ3yaSu0Ay6DqT5EqNf3wwmF qfRpcRSx0nl22i3SvwdD7e43IaIFNRb6CSMZkXdbeholSSA1vjWnoi5HKG6/hlwoT3zg qSSVWfmJV8tk6J4hbKUVuiQ3aSCrXt0Q31PEjCG1D4WUgAzl2XVOMsV7l3KJWEQlqlA4 mwZA== X-Received: by 10.50.43.162 with SMTP id x2mr2710792igl.0.1417736128729; Thu, 04 Dec 2014 15:35:28 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.107.164.217 with HTTP; Thu, 4 Dec 2014 15:34:48 -0800 (PST) In-Reply-To: References: Date: Fri, 5 Dec 2014 08:34:48 +0900 X-Google-Sender-Auth: snefS-YcuGAll_UW3a4QmRlEZM4 Message-ID: To: Levi Morrison Cc: Andrea Faulds , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0103e4ce569a3205096c6a96 Subject: Re: [PHP-DEV] Re: Only variables can be passed by reference From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0103e4ce569a3205096c6a96 Content-Type: text/plain; charset=UTF-8 Hi Levi, On Fri, Dec 5, 2014 at 8:14 AM, Levi Morrison wrote: > > 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. I'm not discussing about how to use stream_select(), but it's signature and parameter passing behavior. It was wrong example apparently. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0103e4ce569a3205096c6a96--