$projectId, ]); # [START firestore_data_set_numeric_increment] $cityRef = $db->collection('samples/php/cities')->document('DC'); // Atomically increment the population of the city by 50. $cityRef->update([ ['path' => 'regions', 'value' => FieldValue::increment(50)] ]); # [END firestore_data_set_numeric_increment] printf('Updated the population of the DC document in the cities collection.' . PHP_EOL); } // The following 2 lines are only needed to run the samples require_once __DIR__ . '/../../testing/sample_helpers.php'; \Google\Cloud\Samples\execute_sample(__FILE__, __NAMESPACE__, $argv);