src/Phone_number.php
public function get_country_code_for_region($region = NULL)
    {
        $inputParams = array('region' => $region);
        $this->debug->info(__FUNCTION__, 'Input Params: ', $inputParams);
        try {
            $phoneNumberUtil = PhoneNumberUtil::getInstance();
            $use_region      = NULL !== $region ? strtoupper($region) : self::DEFAULT_REGION;
            $result          = $phoneNumberUtil->getCountryCodeForRegion($use_region);
            $this->debug->debug(__FUNCTION__, 'Use REGION: ' . $use_region);
            $this->debug->info(__FUNCTION__, 'Final Result: ', $result);

            return $result;
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return NULL;
        }
    }
public function get_country_code_for_region($region = NULL)
    {
        $inputParams = array('region' => $region);
        $this->debug->info(__FUNCTION__, 'Input Params: ', $inputParams);
        try {
            $phoneNumberUtil = PhoneNumberUtil::getInstance();
            $use_region      = NULL !== $region ? strtoupper($region) : self::DEFAULT_REGION;
            $result          = $phoneNumberUtil->getCountryCodeForRegion($use_region);
            $this->debug->debug(__FUNCTION__, 'Use REGION: ' . $use_region);
            $this->debug->info(__FUNCTION__, 'Final Result: ', $result);

            return $result;
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return NULL;
        }
    }
Function get_country_code_for_region
Returns the country calling code for a specific $region.

@author: 713uk13m <dev@nguyenanhung.com>
@time  : 9/21/18 02:16

@param null $region example VN

@see   https://github.com/nguyenanhung/vn-telco-phonenumber/blob/master/test_phone_number.php
@see   https://github.com/giggsey/libphonenumber-for-php/blob/master/docs/PhoneNumberUtil.md

@return int|mixed|null Int if Success, Null if Not