src/PhoneNumberUtil.php
protected function getCountryCodeForValidRegion($regionCode)
    {
        $metadata = $this->getMetadataForRegion($regionCode);
        if ($metadata === null) {
            throw new \InvalidArgumentException('Invalid region code: ' . $regionCode);
        }
        return $metadata->getCountryCode();
    }
protected function getCountryCodeForValidRegion($regionCode)
    {
        $metadata = $this->getMetadataForRegion($regionCode);
        if ($metadata === null) {
            throw new \InvalidArgumentException('Invalid region code: ' . $regionCode);
        }
        return $metadata->getCountryCode();
    }
protected function getCountryCodeForValidRegion ( $ regionCode ) { $ metadata = $ this -> getMetadataForRegion ( $ regionCode ) ; if ( $ metadata === null ) { throw new \ InvalidArgumentException ( 'Invalid region code: ' . $ regionCode ) ; } return $ metadata -> getCountryCode ( ) ; }
Returns the country calling code for a specific region. For example, this would be 1 for the
United States, and 64 for New Zealand. Assumes the region is already valid.

@param string $regionCode the region that we want to get the country calling code for
@return int the country calling code for the region denoted by regionCode
@throws \InvalidArgumentException if the region is invalid
Returns the country calling code for a specific region . For example this would be 1 for the United States and 64 for New Zealand . Assumes the region is already valid .