Re: [RFC][Under Discussion] Add functions array_key_first()and array_key_last()

From: Date: Wed, 20 Jun 2018 14:29:42 +0000
Subject: Re: [RFC][Under Discussion] Add functions array_key_first()and array_key_last()
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-102327@lists.php.net to get a copy of this message
> 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.

« previous php.internals (#102327) next »