On 20 June 2018 at 15:29, Levi Morrison <le...@php.net> wrote:

> > Ah, OK, you learn something every day! For anyone else like me who was
> unaware of this, list() apparently silently accepts any non-array value on
> the right of the assignment, assigns all variables in the list() to null,
> and evaluates to the assigned (but otherwise unused) value. So
> $x=list($a,$b)=42; will set $a and $b to NULL, and $x to 42, without any
> notices.
>
> This is changing as per this RFC:
> https://wiki.php.net/rfc/notice-for-non-valid-array-container. The
> `null` case is kept.
>


Not according to the RFC:

> Per discussion on the PR
<https://github.com/php/php-src/pull/2031#issuecomment-238366706> I have
limited this RFC to not raise warnings when setting any value by use of
list().

It says nothing about treating NULL specially, it just implies list() will
be out of scope of the RFC completely.

Regards,
-- 
Rowan Collins
[IMSoP]

Reply via email to