null safe operator php 7 code example Example: php 8 null safe operator $country = $session?->user?->getAddress()?->country;