Php/docs/mongotimestamp.construct

提供:Dev Guides
< Php
2020年12月14日 (月) 12:45時点におけるNotes (トーク | 投稿記録)による版 (autoload)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

MongoTimestamp::__construct

(PECL mongo >= 1.0.1)

MongoTimestamp::__constructCreates a new timestamp


このメソッドを定義している拡張モジュールは非推奨です。

かわりに MongoDB 拡張モジュールを使うべきです。 このメソッドの代替として、以下が使えます。

説明

public MongoTimestamp::__construct ([ int $sec = time() [, int $inc ]] )

Creates a new timestamp. If no parameters are given, the current time is used and the increment is automatically provided. The increment is set to 0 when the module is loaded and is incremented every time this constructor is called (without the $inc parameter passed in).


パラメータ

sec
Number of seconds since the epoch (i.e. 1 Jan 1970 00:00:00.000 UTC).
inc
Increment.


返り値

Returns this new timestamp.


参考