Longhorn PHP 2026 - Call For Papers

La clase MongoDB\BSON\Timestamp

(mongodb >=1.0.0)

Introducción

Representa un » timestamp BSON. El valor consiste en un timestamp de 4 bytes (es decir, segundos desde la época) y un incremento de 4 bytes.

Nota: Este es un tipo interno de MongoDB utilizado para replicación y particionamiento. No está destinado al almacenamiento general de fechas (debería usarse MongoDB\BSON\UTCDateTime en su lugar).

Sinopsis de la Clase

final class MongoDB\BSON\Timestamp implements MongoDB\BSON\TimestampInterface, MongoDB\BSON\Type, JsonSerializable, Stringable {
/* Métodos */
final public __construct(int $increment, int $timestamp)
final public getIncrement(): int
final public getTimestamp(): int
final public jsonSerialize(): mixed
final public __toString(): string
}

Historial de cambios

Versión Descripción
PECL mongodb 2.0.0 Esta clase ya no implementa la interfaz Serializable.
PECL mongodb 1.12.0 Implementa Stringable para PHP 8.0+.
PECL mongodb 1.3.0 Implementa MongoDB\BSON\TimestampInterface.
PECL mongodb 1.2.0 Implementa Serializable y JsonSerializable.

Tabla de contenidos

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top