Tag

rand

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jan 9, 2024 · Backend Development

Common Random Number Generation Functions in PHP: rand(), mt_rand(), and uniqid()

This article explains PHP's built‑in random number functions—rand(), mt_rand(), and uniqid()—including their signatures, optional parameters, usage examples, and when to choose each function for generating verification codes, passwords, or unique identifiers in web development.

backend-developmentmt_randrand
0 likes · 4 min read
Common Random Number Generation Functions in PHP: rand(), mt_rand(), and uniqid()
Laravel Tech Community
Laravel Tech Community
Feb 23, 2021 · Backend Development

PHP rand() Function – Generating Random Integers

The PHP rand() function returns a pseudo‑random integer within a given range, defaulting to 0 through getrandmax() when no parameters are supplied, and includes details on its parameters, return value, and usage examples.

PHPRandombackend
0 likes · 2 min read
PHP rand() Function – Generating Random Integers
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 10, 2020 · Databases

Investigating a MySQL RAND() Bug in Derived Tables (MySQL 5.7.25)

The article documents a puzzling MySQL 5.7.25 bug where RAND() in a derived table is unexpectedly re‑evaluated in the outer query, explains the step‑by‑step reproduction, analyses the cause, and provides official work‑arounds for both MySQL 5.7 and 8.0.

DatabaseDerived TableSQL
0 likes · 6 min read
Investigating a MySQL RAND() Bug in Derived Tables (MySQL 5.7.25)