Please wait while we load your page...

PasswordSentry

Latest Version [8.00202205221] Last Updated [May-22-2022]

Tools

PHP Manual [MongoDB\BSON\ObjectId

Protect Your Website Today


PHP Manual || MongoDB\BSON\ObjectId

(mongodb >=1.0.0)

MongoDB\BSON\ObjectId::__toStringReturns the hexidecimal representation of this ObjectId

Description

final public MongoDB\BSON\ObjectId::__toString ( void ) : string

Parameters

This function has no parameters.

Return Values

Returns the hexidecimal representation of this ObjectId.

Examples

Example #1 MongoDB\BSON\ObjectId::__toString() example

<?php

var_dump
((string) new MongoDB\BSON\ObjectId());
var_dump((string) new MongoDB\BSON\ObjectId('000000000000000000000001'));

?>

The above example will output something similar to:

string(24) "56731b49da14d8747d701211"
string(24) "000000000000000000000001"


PHP Manual || MongoDB\BSON\ObjectId