str::quickRandom($length = false, $type = 'alphaNum')

Quickly generates a random string

  • since: Kirby 2.4.0
  • $length (int)
    The length of the random string
  • $type (string)
    Pool type (type of allowed characters)
  • return (string)

This method is faster than str::random($length = false, $type = 'alphaNum') in most cases, but should not be considered sufficient for cryptography, etc.
Please note that str::random can sometimes be faster, e.g. when the pool is very large (e.g. 'alphaNum' or 'alpha').