Tag

random number

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()
php中文网 Courses
php中文网 Courses
Aug 17, 2023 · Backend Development

Using PHP mt_rand() Function to Generate Random Numbers

This article explains PHP's mt_rand() function, which uses the Mersenne Twister algorithm to generate high‑quality random integers, shows how to call it with or without parameters to produce numbers within a default or specified range, and highlights its efficiency and automatic seeding.

backendmt_randphp-functions
0 likes · 3 min read
Using PHP mt_rand() Function to Generate Random Numbers
php中文网 Courses
php中文网 Courses
Aug 16, 2023 · Backend Development

Understanding PHP's mt_rand() Function: Syntax, Parameters, Return Value, and Practical Examples

This article explains PHP's mt_rand() pseudo‑random number generator, covering its syntax, optional min and max parameters, return value, and provides three practical code examples for generating random integers, unique integer sets, and random strings, followed by a brief summary and learning resources.

PHPbackend developmentcode examples
0 likes · 5 min read
Understanding PHP's mt_rand() Function: Syntax, Parameters, Return Value, and Practical Examples
Kuaishou Tech
Kuaishou Tech
Oct 25, 2021 · Fundamentals

Noise Techniques for Short Video Effects and Their Generation Algorithms

This article explores how various noise algorithms—including value, gradient, simplex, cellular, and FBM—are applied to short video visual effects, compares random number generators for GPU rendering, and provides GLSL code examples to illustrate implementation and performance trade‑offs.

GPUProcedural GenerationShader
0 likes · 17 min read
Noise Techniques for Short Video Effects and Their Generation Algorithms
Laravel Tech Community
Laravel Tech Community
Feb 18, 2021 · Backend Development

PHP mt_srand Function – Seeding the Random Number Generator

The article explains PHP's mt_srand() function for seeding the Mersenne Twister random number generator, describes its optional integer seed parameter, notes that it returns no value, and provides a complete example with code and sample output.

ExamplePHPbackend
0 likes · 1 min read
PHP mt_srand Function – Seeding the Random Number Generator
Laravel Tech Community
Laravel Tech Community
Feb 17, 2021 · Backend Development

mt_rand() – Generating Better Random Numbers in PHP

The article explains PHP's mt_rand() function, which provides a faster and more reliable random number generator than the older rand(), details its optional min and max parameters, return range, and includes sample code demonstrating usage and typical output.

PHPbackendmt_rand
0 likes · 2 min read
mt_rand() – Generating Better Random Numbers in PHP
Laravel Tech Community
Laravel Tech Community
Dec 5, 2020 · Backend Development

Generating Random Numbers in PHP Using shuffle, array_unique, array_flip, and Custom Functions

This article demonstrates multiple PHP techniques for generating unique random numbers, including using shuffle on a range array, applying array_unique with a while loop, leveraging array_flip to remove duplicates, and creating a customizable randpw function with mt_rand, complete with code examples and output results.

Code Examplearray-functionsbackend
0 likes · 4 min read
Generating Random Numbers in PHP Using shuffle, array_unique, array_flip, and Custom Functions