Re: Proposal for RFC to remove undef ined array index warning when used ina ternary

From: Date: Sun, 27 Feb 2022 23:17:13 +0000
Subject: Re: Proposal for RFC to remove undef ined array index warning when used ina ternary
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-117158@lists.php.net to get a copy of this message
>Hi, > >In PHP, you can write $array['a']['b']['c'] ?? >'default';. It works when either null or inexistant index is encountered >at any depth of the expression. > >—Claude You're right, I did not know that. Thank you. That basically replaces the need for my proposal, then. Regards, Mel

« previous php.internals (#117158) next »