function GetTargetableLanguagesAndCarriersExample(AdWordsUser $user)
{
    // Get the service, which loads the required classes.
    $constantDataService = $user->GetService('ConstantDataService', ADWORDS_VERSION);
    // Make the getLanguageCriterion request.
    $languages = $constantDataService->getLanguageCriterion();
    foreach ($languages as $language) {
        printf("Language with name '%s' and ID '%s' was found.\n", $language->name, $language->id);
    }
    print "\n";
    // Make the getCarrierCriterion request.
    $carriers = $constantDataService->getCarrierCriterion();
    foreach ($carriers as $carrier) {
        printf("Carrier with name '%s', country code '%s', and ID '%s' was " . "found.\n", $carrier->name, $carrier->countryCode, $carrier->id);
    }
}
// Don't run the example if the file is being included.
if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
    return;
}
try {
    // Get AdWordsUser from credentials in "../auth.ini"
    // relative to the AdWordsUser.php file's directory.
    $user = new AdWordsUser();
    // Log every SOAP XML request and response.
    $user->LogAll();
    // Run the example.
    GetTargetableLanguagesAndCarriersExample($user);
} catch (Exception $e) {
    printf("An error has occurred: %s\n", $e->getMessage());
}
 public function testGetTargetableLanguagesAndCarriersExample()
 {
     GetTargetableLanguagesAndCarriersExample($this->user);
 }