Home >Backend Development >PHP Tutorial >PHP generates a unique order number, PHP generates an order number_PHP tutorial
I searched online and found that this classmate’s idea is quite good, redtamo, please go and check it out for details. Look, let me give a brief overview. This method uses English letters, year, month, day, Unix timestamp, microseconds, and random numbers. The possibility of duplication is greatly reduced, which is still very good. The use of letters is very representative, one letter corresponds to one year, a total of 16 digits, no more, no less.
1.
Copy code The code is as follows:857819422af235c9d401ecb2cc92004b
Generation effect:
A422694333616096
2.
Copy code The code is as follows:e05ef72f1b7375a3f465353227129651
Output result:
2014062356100485 2014062349535399
The above is the entire content of this article, I hope you all like it.