$adGroupCriterion = new BiddableAdGroupCriterion();
    $adGroupCriterion->adGroupId = $adGroupId;
    $adGroupCriterion->criterion = new Criterion($criterionId);
    // Update destination URL.
    $adGroupCriterion->destinationUrl = 'http://www.example.com/new';
    // Create operation.
    $operation = new AdGroupCriterionOperation();
    $operation->operand = $adGroupCriterion;
    $operation->operator = 'SET';
    $operations = array($operation);
    // Make the mutate request.
    $result = $adGroupCriterionService->mutate($operations);
    // Display result.
    $adGroupCriterion = $result->value[0];
    printf("Keyword with ID '%s' has updated destination URL '%s'.\n", $adGroupCriterion->criterion->id, $adGroupCriterion->destinationUrl);
}
// 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.
    UpdateKeywordExample($user, $adGroupId, $criterionId);
} catch (Exception $e) {
    printf("An error has occurred: %s\n", $e->getMessage());
}
 public function testUpdateKeywordExample()
 {
     $criterionId = $this->testUtils->CreateKeyword($this->adGroupId);
     UpdateKeywordExample($this->user, $this->adGroupId, $criterionId);
 }