Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79414 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25356 invoked from network); 4 Dec 2014 08:32:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2014 08:32:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.245 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.245 imap11-3.ox.privateemail.com Received: from [198.187.29.245] ([198.187.29.245:48826] helo=imap11-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/E0-16128-83C10845 for ; Thu, 04 Dec 2014 03:32:57 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id E76328800DA; Thu, 4 Dec 2014 03:32:53 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap11.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap11.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id T1xlBVHujKed; Thu, 4 Dec 2014 03:32:53 -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 3F6158800D5; Thu, 4 Dec 2014 03:32:52 -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 08:32:50 +0000 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: <091A4805-7B61-4CBD-A5C5-EDFC068616CF@ajf.me> References: To: Yasuo Ohgaki X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] Only variables can be passed by reference From: ajf@ajf.me (Andrea Faulds) > On 4 Dec 2014, at 08:28, Yasuo Ohgaki wrote: >=20 > Hi all, >=20 > I think we can get rid of this error now when literal is returned. > The reason we have E_STRICT error is that legacy PHP didn't > support this, I suppose. >=20 > http://3v4l.org/8fISj Hmm, I think there=E2=80=99s some logic to having a warning anyway. If a = parameter is taken by reference, then it=E2=80=99s presumably going to = be modified. So if you pass something that isn=E2=80=99t a variable (and = therefore the modified result can=E2=80=99t be accessed) to a = by-reference parameter, it doesn=E2=80=99t really make sense. -- Andrea Faulds http://ajf.me/