MongoDB\BSON\Timestamp::__construct
(mongodb >=1.0.0)
MongoDB\BSON\Timestamp::__construct - 새로운 타임스탬프 생성
설명
final public MongoDB\BSON\Timestamp::__construct(int $increment
, int $timestamp
)
매개변수
increment
(int)- 주어진 초 내의 연산에 대한 증분 서수를 나타내는 32비트 정수.
timestamp
(int)- Unix 시대 이후의 초를 나타내는 32비트 정수입니다.
오류/예외
- 인수 구문 분석 오류에 대해 MongoDB\Driver\Exception\InvalidArgumentException을 던집니다.
Examples
예제 #1 MongoDB\BSON\Timestamp::__construct() 예제
<?php
$timestamp = new MongoDB\BSON\Timestamp(1234, 5678);
?>
위의 예는 다음을 출력합니다.
object(MongoDB\BSON\Timestamp)#1 (2) { ["increment"]=> int(1234) ["timestamp"]=> int(5678) }