DonkeyID-64-bit self-increasing ID generator released version 1.1.1, supports php8!

DonekyId-1.1.1 version is released, this version supports php8.0!

The update record is as follows:

  1. Support php8.0!
  2. Fixed compile-time warning.
  3. Fixed some compatibility issues.

This version is supported from php5.3 to php8.0.

About DonkeyID

donkeyid is a php extension for generating unique id. Use snowflake algorithm to achieve. And supports multiple id types.

DonkeyId has three id generation modes:

  1. The default mode, the above introduction is based on the default mode, (mysql field please use bigint(20)). dk_get_next_id().
  2. The second mode is the decimal mode to generate up to 20 digits (please use varchar(20) for the mysql field). The tenth digit from the right is the second of the timestamp, and the seventh to ninth digits are Node id. Three digits, up to 999. From the 2nd to the 6th digits are the self-incrementing id within seconds, and the last digit is the custom digits left to the business side. 2016053010150316300120001.dk_get_ts_id().
  3. The third mode is a string mode, which generates a 25-digit string. The first 17 digits are year, month, day, hour, minute, second and millisecond, the 18th to 21st digits are node id, and the 22nd-25th digits are self-increasing id in milliseconds. (Please use varchar(25) for mysql field). dk_get_dt_id().

Guess you like

Origin www.oschina.net/news/120494/donkeyid-1-1-1-released