Serialize a ServerApi

- « MongoDB\Driver\ServerApi::__construct

- MongoDB\Driver\ServerApi::unserialize »

- PHP Manual
- MongoDB\Driver\ServerApi
- Serialize a ServerApi

# MongoDB\Driver\ServerApi::serialize

(mongodb >=1.10.0)

MongoDB\Driver\ServerApi::serialize — Serialize a ServerApi

### Description

final public MongoDB\Driver\ServerApi::serialize(): string

### Parameters

This function has no parameters.

### Return Values

Returns the serialized representation of the MongoDB\Driver\ServerApi.

### Errors/Exceptions

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

### See Also

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