:] $parts = explode(':', substr((string) $sec, 1, -1)); $this->sec = (int) $parts[1]; $this->inc = (int) $parts[0]; return; } if (func_num_args() == 0) { $sec = time(); } if (func_num_args() <= 1) { $inc = static::$globalInc; static::$globalInc++; } $this->sec = (int) $sec; $this->inc = (int) $inc; } /** * @return string */ public function __toString() { return (string) $this->sec; } /** * Converts this MongoTimestamp to the new BSON Timestamp type * * @return Timestamp * @internal This method is not part of the ext-mongo API */ public function toBSONType() { return new Timestamp($this->inc, $this->sec); } }