If the number itself has a country calling code of zero or an otherwise invalid country calling code, then we return the number with no formatting applied.
Note this function takes care of the case for calling inside of NANPA and between Russia and Kazakhstan (who share the same country calling code). In those cases, no international prefix is used. For regions which have multiple international prefixes, the number in its INTERNATIONAL format will be returned instead.
public formatOutOfCountryCallingNumber ( |
||
$number | the phone number to be formatted | |
$regionCallingFrom | string | the region where the call is being placed |
return | string | the formatted phone number |