functionCreateid ($prefix= ""){ $str= MD5(uniqid(Mt_rand(), true)); return$prefix. $str;}//Uniqid (prefix,more_entropy)The Uniqid () function generates a unique ID based on the current time in microseconds.prefix is optional. Specify a prefix
Use the uniqid () function in php to generate a unique id.
Function createId ($ prefix = "") {$ str = md5 (uniqid (mt_rand (), true); return $ prefix. $ str;} // uniqid (prefix, more_entropy)
The uniqid () function generates a unique ID based on
function Createid ($prefix = "")
{
$str = MD5 (Uniqid (Mt_rand (), true);
Return $prefix. $str;
}
uniqid (prefix,more_entropy)
The Uniqid () function generates a unique ID based on the current time in microseconds. Prefix optional. Specify
1. Any number of parameters of the function
You may know that PHP allows you to define a function of a default parameter. But you may not know that PHP also allows you to define a function of an entirely arbitrary parameter
Here is an example of a
Summary of nine common functions for PHP development. 1. any number of function parameters you may know that PHP allows you to define a function with default parameters. However, you may not know that PHP also allows you to define a function with
Summary of nine common functions and functions for PHP Development. For more information about php learning, see.
1. any number of parameters of the function
You may know that PHP allows you to define a default parameter function. But you may not
Summary of nine common functions and functions for PHP Development. For more information about php learning, see.
1. any number of parameters of the function
You may know that PHP allows you to define a default parameter function. But you may not
1. Any number of parameters of the Function
You may know that PHP allows you to define a default parameter function. But you may not know that PHP also allows you to define a function with all arbitrary parameters.
The following example shows the
Php development tips 1: Below are nine useful functions in PHP. do you know you have used them? 1. any number of function parameters you may know that PHP allows you to define a function with default parameters. But you may not know that PHP also
The following small series will introduce nine php functions and features that you must know and can use. Very practical! If you need a friend, you can refer to the following nine useful functions in PHP. do you know you have used them?
1. any
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.