PHP-Fusion Development

random_string()

Generate random string.

Versions: 9

random_string( [ int $length ] ) : string

Parameters

$length (int) (Optional) The length of the string. Default value: 6

Return Values

(string) Generated string.

Examples

echo random_string(10);
// oghHY2Zbag