Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83543 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69800 invoked from network); 23 Feb 2015 05:33:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2015 05:33:00 -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.216.176 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.176 mail-qc0-f176.google.com Received: from [209.85.216.176] ([209.85.216.176:46987] helo=mail-qc0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/60-01128-A8BBAE45 for ; Mon, 23 Feb 2015 00:32:59 -0500 Received: by qcxr5 with SMTP id r5so9521380qcx.13 for ; Sun, 22 Feb 2015 21:32:55 -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=fs2qdQzDmbVj32rWQwvyuUBpZIPMvJ2wf1qbLDmXH+8=; b=pBQliu9I7MR/YzML7QoFVlMvADfjwJFqhF+stXf0mTzLCPPz0G9iy+rNJEfkRAEQXQ r238xBJ/e+ZrVRqoMF9r2ZRHchZIuYMG0QRkR/khkMLRUUYI42kaJkyp1olkqvPiPQdz MnG2dd532pR58Elt9fJoYybQWuxKl9JRjabZ/fFQ+xaLitG82OtX0ctKHyWIOcFHmXkY hcSPpdMsT01mhCAzpzhpssyl0TjrE5J0AixIlDXo2CVQmjLraDT8j5oBjnb1FqyCIBcW 8uRL1G3l8YKQ8xPZVCvx+8dg/mUTsEbAntZHFWW3YeowfHbfDfrTLJOWLhXianCyU90O kzcQ== X-Received: by 10.229.131.138 with SMTP id x10mr21795855qcs.25.1424669575289; Sun, 22 Feb 2015 21:32:55 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Sun, 22 Feb 2015 21:32:15 -0800 (PST) In-Reply-To: References: Date: Mon, 23 Feb 2015 14:32:15 +0900 X-Google-Sender-Auth: dWJ51Y66ZjoAEIRk5y-XWEr_f_Y Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a1133dde2f52431050fbabb52 Subject: Re: [PHP-DEV] Reclassify E_STRICT notices From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1133dde2f52431050fbabb52 Content-Type: text/plain; charset=UTF-8 Hi Nikita, On Mon, Feb 23, 2015 at 7:30 AM, Nikita Popov wrote: > I would like to propose reclassifying our few existing E_STRICT notices and > removing this error category: > > https://wiki.php.net/rfc/reclassify_e_strict > > As we don't really have good guidelines on when which type of error should > be thrown, I'm mainly going by what category other similar errors use. I'm > open to suggestions, but hope this will not deteriorate into total > bikeshed. > +1 overall. Regarding "Only variables should be assigned by reference" Most of errors are appropriate, but some of them may be removed. For example, literals do not make sense so current behavior is good. $ php -r 'array_pop([1,2,3]);' PHP Fatal error: Only variables can be passed by reference in Command line code on line 1 However, emitting "Only variables should be assigned by reference" for this $top = array_pop(some_func_returns_array()); // Code needs only top element seems too strict, for example. I would rather PHP behaves like HHVM - http://3v4l.org/5AIrb. - http://3v4l.org/O0SXE Is it possible relax the error for tmp variables? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1133dde2f52431050fbabb52--