Install the complete package with local command reference and every published mode.
install randrandUse the default modes for tokens, random keys, temporary identifiers or other values that must be hard to predict. -mt exists for fast deterministic-style workloads and tests; it is deliberately separate from the secure generator.
Secure integers, bytes and strings use the cryptographic random source. A UUID is designed as an identifier, not a secret, and -mt can be reproducible when seeded, so MT output must not be used for passwords, access tokens or cryptographic keys.
rand [min [max]]randgenerate a cryptographic integer from 0 to PHP_INT_MAX
rand <max>generate a cryptographic integer from 0 to max
rand <min> <max>generate a cryptographic integer in the selected range
rand -n <count> [min] [max]generate several integers
rand -b <bytes>generate cryptographic random bytes as hexadecimal
rand -s <length>generate a cryptographic alphanumeric string
rand -uuidgenerate an RFC 4122 version 4 UUID
rand -mt [min] [max]generate a fast non-cryptographic integer
rand -mt -seed <integer>seed the MT generator before generation
rand -maxshow integer generator limits
Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.
Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.
Base and Minimum are two packages of the same current module release, not separate command versions.
Install the complete package with local command reference and every published mode.
install randInstall the reduced package. Local reference is omitted;
install rand -mInstall exactly this published version.
install rand -v 1.1.2Ask upgrade to check compatibility and replace the installed block only when needed.
upgrade randRemove the extension block while leaving the core and unrelated modules intact.
install rand -uExamples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.
rand -max | rand 1 100secure 9223372036854775807
mt 2147483647
42rand -n 5 1 107f3d9a2c8e41b650rand -s 327f3d9a2c8e41b650rand -uuid7f3d9a2c8e41b650rand 10 1Minimum exceeds maximumCurrent stable release of