array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'class.mongodb-bson-int64.php', 1 => 'MongoDB\\BSON\\Int64', ), 'up' => array ( 0 => 'book.bson.php', 1 => 'MongoDB\\BSON', ), 'prev' => array ( 0 => 'mongodb-bson-dbpointer.unserialize.php', 1 => 'MongoDB\\BSON\\DBPointer::unserialize', ), 'next' => array ( 0 => 'mongodb-bson-int64.construct.php', 1 => 'MongoDB\\BSON\\Int64::__construct', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/bson/int64.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.mongodb-bson-int64.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(mongodb >=1.5.0)
BSON type for a 64-bit integer. When decoding BSON to PHP data, this class is used when a 64-bit integer cannot be represented as a PHP integer on 32-bit platforms. These objects support overloaded arithmetic, bitwise, and comparison operators.
When working with raw BSON data through the MongoDB\BSON\Document, MongoDB\BSON\PackedArray, and MongoDB\BSON\Iterator classes, any 64-bit integer will be returned as an instance of this class, regardless of platform and whether the value can be represented as a PHP integer. This ensures that values can be roundtripped without changing the type.
During BSON encoding, objects of this class will convert back to a 64-bit integer type, even when the value would fit in a 32-bit integer. This allows explicitly storing values as 64-bit integers in BSON.
版本 | 说明 |
---|---|
PECL mongodb 1.16.0 | The class can now be instantiated on all platforms. Added support for overloaded arithmetic, bitwise, and comparison operators. |
PECL mongodb 1.12.0 | Implements Stringable for PHP 8.0+. |