PHP uniqid() Function
The uniqid() function generates a unique ID based on
the current time in microseconds.
Syntax
uniqid(string $prefix = "", bool $more_entropy = false): string
Try It Online
Output
Click Run to execute your code
Related Functions
- random_bytes() - Cryptographically secure pseudo-random bytes
- random_int() - Cryptographically secure pseudo-random integers
Enjoying these tutorials?