Hi Nikita,

On Mon, Feb 23, 2015 at 7:30 AM, Nikita Popov <nikita....@gmail.com> 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
yohg...@ohgaki.net

Reply via email to