Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79416 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28948 invoked from network); 4 Dec 2014 08:48:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2014 08:48:52 -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.213.174 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.174 mail-ig0-f174.google.com Received: from [209.85.213.174] ([209.85.213.174:61804] helo=mail-ig0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/A1-16128-3FF10845 for ; Thu, 04 Dec 2014 03:48:51 -0500 Received: by mail-ig0-f174.google.com with SMTP id hn15so18351267igb.1 for ; Thu, 04 Dec 2014 00:48:48 -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=UadneqAghdeK+oCp9WJk1IzklwQWghDFiFZHZKYFaBY=; b=wnvbxXEWjAbY5iNnbCyuikv47G2D+W2kf6qhrvSk/rf4DGhitQtjmNvi7ZnNAZLKOY Kt/13DZSfgaPhpAjn677b3j7mm0+VFYlctMDu4ptAonASJNVlEhsAwFYln4wp5h5ArQr HvQ+bx12lUoRC0DhcV9PSz823imgpp1EHvzEIwJ3B5LEGbcg/p46XoWvJG0SkiiwnuEv C7Gz8tJTLIsFKm/DetJWq5Zs0tCzD5Jsk49QWYECFDkfochWPCn0rnWlsFsxGcilQtlB nVZE7hP3fSp8lrfmIgPaUABXqw4KXa1xLtuM+NpQOFAJcxQNwHDJmffbWX3TbcUp1nC5 pKbw== X-Received: by 10.107.130.197 with SMTP id m66mr8892487ioi.10.1417682927832; Thu, 04 Dec 2014 00:48:47 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.107.164.217 with HTTP; Thu, 4 Dec 2014 00:48:07 -0800 (PST) In-Reply-To: <091A4805-7B61-4CBD-A5C5-EDFC068616CF@ajf.me> References: <091A4805-7B61-4CBD-A5C5-EDFC068616CF@ajf.me> Date: Thu, 4 Dec 2014 17:48:07 +0900 X-Google-Sender-Auth: HPoEz8TVnv4fb1tt5iwlWycnlAk Message-ID: To: Andrea Faulds Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a113ed0e25155d00509600704 Subject: Re: [PHP-DEV] Only variables can be passed by reference From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113ed0e25155d00509600704 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Andrea, On Thu, Dec 4, 2014 at 5:32 PM, Andrea Faulds wrote: > > 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. > > > > 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=99= t really make > sense. I agree. It might be a bug in user code simply. However, example code illustrates that there is valid usage. Static method may return literal, default for some config, etc. http://3v4l.org/jKXpb We may use @ or get rid of E_STRICT altogether. I wonder if we really need E_STRICT error here. -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113ed0e25155d00509600704--