original_string: protected function delete_many_connection(Memcached $connection, array $keys) {
          $count = 0;
          if ($this->candeletemulti) {
              // We can use deleteMulti, this is a bit faster yay!
              $result = $connection->deleteMulti($keys);
              foreach ($result as $key => $outcome) {
                  if ($outcome === true) {
                      $count++;
                  }
              }
              return $count;
          }
  
          // They are running an older version of the php memcached extension.
          foreach ($keys as $key) {
              if ($connection->delete($key)) {
                  $count++;
              }
          }
          return $count;
      }
code: protected function delete_many_connection(Memcached $connection, array $keys) {
          $count = 0;
          if ($this->candeletemulti) {
              // We can use deleteMulti, this is a bit faster yay!
              $result = $connection->deleteMulti($keys);
              foreach ($result as $key => $outcome) {
                  if ($outcome === true) {
                      $count++;
                  }
              }
              return $count;
          }
  
          // They are running an older version of the php memcached extension.
          foreach ($keys as $key) {
              if ($connection->delete($key)) {
                  $count++;
              }
          }
          return $count;
      }
code_tokens: protected function delete_many_connection ( Memcached $ connection , array $ keys ) { $ count = 0 ; if ( $ this -> candeletemulti ) { // We can use deleteMulti, this is a bit faster yay! $ result = $ connection -> deleteMulti ( $ keys ) ; foreach ( $ result as $ key => $ outcome ) { if ( $ outcome === true ) { $ count ++ ; } } return $ count ; } // They are running an older version of the php memcached extension. foreach ( $ keys as $ key ) { if ( $ connection -> delete ( $ key ) ) { $ count ++ ; } } return $ count ; }
docstring: Deletes several keys from the cache in a single action for a specific connection.
  
  @param Memcached $connection The connection to work on.
  @param array $keys The keys to delete
  @return int The number of items successfully deleted.
docstring_tokens: Deletes several keys from the cache in a single action for a specific connection .