# MongoDB\BSON\Timestamp::serialize

(mongodb >=1.2.0)

MongoDB\BSON\Timestamp::serialize — Serialize a Timestamp

### Description

final public MongoDB\BSON\Timestamp::serialize ( void ) : string

### Parameters

This function has no parameters.

### Return Values

Returns the serialized representation of the MongoDB\BSON\Timestamp.

### Errors/Exceptions

- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.

### See Also

- MongoDB\BSON\Timestamp::unserialize() - Unserialize a Timestamp
- serialize() - Generates a storable representation of a value
- Serializing Objects