Home >Backend Development >PHP Tutorial >PHP generates a unique order number, PHP generates an order number_PHP tutorial

PHP generates a unique order number, PHP generates an order number_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:47:14819browse

PHP generates a unique order number, PHP generates an order number

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1027048.htmlTechArticlePHP generates a unique order number. PHP generates an order number. After searching online, I found that this classmate had a very good idea. Not bad, redtamo, please go and check it out for details, I will give a brief overview, the method...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn