Function __global->uniqid
Definitions
sources_custom/phpstub.php
- Generate a unique ID.NOT CRYPTOGRAPHICALLY SECURE: USE get_secure_random_string() instead.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $prefix | string | No | No | required parameter | N/A | N/A | Prefix for unique ID |
| $lcg | boolean | No | No | required parameter | N/A | N/A | Whether to add additional "combined LCG" entropy at the end of the return value. Always pass as true, because on some IIS systems the timer resolution will be in seconds. |
Returns
- Unique ID
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Generate a unique ID.NOT CRYPTOGRAPHICALLY SECURE: USE get_secure_random_string() instead.
*
* @param string $prefix Prefix for unique ID
* @param boolean $lcg Whether to add additional "combined LCG" entropy at the end of the return value. Always pass as true, because on some IIS systems the timer resolution will be in seconds.
* @return string Unique ID
*/
function uniqid(string $prefix, bool $lcg) : string
* Generate a unique ID.NOT CRYPTOGRAPHICALLY SECURE: USE get_secure_random_string() instead.
*
* @param string $prefix Prefix for unique ID
* @param boolean $lcg Whether to add additional "combined LCG" entropy at the end of the return value. Always pass as true, because on some IIS systems the timer resolution will be in seconds.
* @return string Unique ID
*/
function uniqid(string $prefix, bool $lcg) : string

