|
uniqidGenerate a time-based identifier Description
string uniqid(string
$prefix = "", bool $more_entropy = false )
Gets an identifier based on the current time with microsecond precision,
prefixed with the given Caution
This function does not generate cryptographically secure values, and must not be used for cryptographic purposes, or purposes that require returned values to be unguessable. If cryptographically secure randomness is required, the Random\Randomizer may be used with the Random\Engine\Secure engine. For simple use cases, the random_int and random_bytes functions provide a convenient and secure API that is backed by the operating system’s CSPRNG. Warning
This function does not guarantee the uniqueness of the return
value because the value is based on the current time in microseconds
or the current time with a small amount of random data appended
if Parameters
Return ValuesReturns timestamp based identifier as a string. Warning
This function does not guarantee the uniqueness of the return value. Examples
Example #1 uniqid Example
Notes
See Also
|