Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79424 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52205 invoked from network); 4 Dec 2014 12:26:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2014 12:26:13 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:38455] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/53-34106-4E250845 for ; Thu, 04 Dec 2014 07:26:12 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 0D2F12400D0; Thu, 4 Dec 2014 07:26:10 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hSIJyQNtjhYu; Thu, 4 Dec 2014 07:26:09 -0500 (EST) Received: from oa-res-27-210.wireless.abdn.ac.uk (oa-res-27-210.wireless.abdn.ac.uk [137.50.27.210]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 4E38E2400C7; Thu, 4 Dec 2014 07:26:08 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: Date: Thu, 4 Dec 2014 12:26:06 +0000 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Yasuo Ohgaki X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] Re: Only variables can be passed by reference From: ajf@ajf.me (Andrea Faulds) > On 4 Dec 2014, at 10:38, Yasuo Ohgaki wrote: >=20 >=20 > Yet another sample code. This cannot be executed on 3v4l.org for = security > reasons. >=20 > $sock =3D fsockopen('www.php.net', '80'); > var_dump($sock); >=20 > $socks =3D array($sock); > var_dump(stream_select($socks, $socks, $socks, 1)); >=20 > //var_dump(stream_select(array($sock), array($sock), array($sock), = 1)); > //Fatal error: Only variables can be passed by reference in > /home/yohgaki/tmp/ttt.php on line 8 > ?> Using stream_select without real variables like that is weird, what=E2=80=99= s the point? You=E2=80=99ve discarded the read/write/error information, = all the return value tells you is that *something* changed. -- Andrea Faulds http://ajf.me/