string ion\serialize(mixed $data, [ion\Serializer|array|null $serializer = NULL])

Serialize a PHP value as ION data.

Serializes supported PHP values with the optionally provided \ion\Serializer:

Params:

Returns:

Throws: