Home > PHP > Function > > bson_encode()

bson_encode()

bson_encode - Serializes a PHP variable into a BSON string

Syntax

string bson_encode (mixed $anything)

Arguments

  • anything - The variable to be serialized.

Description

Version

PHP PECL mongo >=1.0.1

Return value

Returns the serialized string.