On Sun, 5 Apr 2026 at 08:17, Aleksander Machniak <[email protected]> wrote:
> On 4.04.2026 16:06, Barel wrote: > > This is the link to the RFC: https://wiki.php.net/rfc/ > > array_get_and_array_has < > https://wiki.php.net/rfc/array_get_and_array_has> > I'd prefer $key=null case removed. It's not that useful, not on pair > with array_has(), and one would debate what to do with the $default in > this case. > > I'm not sure this needs to be stated in the RFC, but I hope they do not > throw a warning when the key does not exist, on any level. > Thanks for your comments. I would like to hear what other people think about the `null` case. I find it useful but if other people think it is unnecessary, it can be easily removed. In any case, the $default would not be used in this case And, no, no warning will be thrown if any part of the path does not exist, being able to easily support not existing paths is one of the main reasons for this RFC Cheers Carlos > > -- > Aleksander Machniak > Kolab Groupware Developer [https://kolab.org] > Roundcube Webmail Developer [https://roundcube.net] > ---------------------------------------------------- > PGP: 19359DC1 # Blog: https://kolabian.wordpress.com >
