bson_encode Serializes a PHP variable into a BSON string &reftitle.description; stringbson_encode mixedanything This function is very beta and entirely useless for 99% of users. It is only useful if you're doing something weird, such as writing your own driver on top of the PHP driver. &reftitle.parameters; anything The variable to be serialized. &reftitle.returnvalues; Returns the serialized string.