php8.5
Home/ Manual/ bson / int64/ MongoDB\BSON\Int64::__toString

MongoDB\BSON\Int64::__toString

PHP function Edit on GitHub ✎

(mongodb >=1.5.0)

Returns the string representation of this Int64

Description

MongoDB\BSON\Int64::__toString(): string

Parameters Parameters

Return Values

Returns the string representation of this Int64.

Examples

MongoDB\BSON\Int64::__toString() example

php
<?php

$int64 = new MongoDB\BSON\Int64('9223372036854775807');

var_dump((string) $int64);

?>

The above example will output something similar to:

output
string(19) "9223372036854775807"

See Also

  • BSON Types

Source: reference/mongodb/bson/int64/tostring.xml · from the official PHP manual (php/doc-en)