public function getRegionCode() : ?string
    {
        $regionCode = PhoneNumberUtil::getInstance()->getRegionCodeForNumber($this->phoneNumber);

        if ($regionCode === '001') {
            return null;
        }

        return $regionCode;
    }
public function getRegionCode() : ?string
    {
        $regionCode = PhoneNumberUtil::getInstance()->getRegionCodeForNumber($this->phoneNumber);

        if ($regionCode === '001') {
            return null;
        }

        return $regionCode;
    }
public function getRegionCode ( ) : ? string { $ regionCode = PhoneNumberUtil :: getInstance ( ) -> getRegionCodeForNumber ( $ this -> phoneNumber ) ; if ( $ regionCode === '001' ) { return null ; } return $ regionCode ; }
Returns the region code of this PhoneNumber.

The region code is an ISO 3166-1 alpha-2 country code.

If the phone number does not map to a geographic region
(global networks, such as satellite phone numbers) this method returns null.

@return string|null The region code, or null if the number does not map to a geographic region.
Returns the region code of this PhoneNumber .