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