Re: [RFC] Nullsafe operator
| From: | Markus Fischer | Date: | Tue, 14 Jul 2020 10:44:15 +0000 |
| Subject: | Re: [RFC] Nullsafe operator | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110997@lists.php.net to get a copy of this message | ||
Hi,
On 14.07.20 10:51, Ilija Tovilo wrote:
Thanks for clarifying, that's fantastic :) - MarkusWould this still work together with short-circuiting and the null coalesce operator? $country = $session?->user?->getAddress()?->country ?? 'defaultCountry';Yes, your example will still work, this is solely about references :)