class Random (View source)

Pure-PHP Random Number Generator

Methods

static string
string(int $length)

Generate a random string.

Details

static string string(int $length)

Generate a random string.

Although microoptimizations are generally discouraged as they impair readability this function is ripe with microoptimizations because this function has the potential of being called a huge number of times. eg. for RSA key generation.

Parameters

int $length

Return Value

string