shuffle
shuffle — Shuffle an array.Description
shuffle( array &$array ): boolThis function shuffles (randomizes the order of the elements in) an array.
Caution: This function does not generate cryptographically secure values, and must not be used for cryptographic purposes, or purposes that require returned values to be unguessable. If cryptographically secure randomness is required, the Random\Randomizer may be used with the Random\Engine\Secure engine. For simple use cases, the random_int() and random_bytes() functions provide a convenient and secure API that is backed by the operating system’s CSPRNG.
Parameters
array
The array to be shuffled.
Return Values
Returns true on success or false on failure.More information about shuffle on official PHP documentation site
shuffle - Popular snippets
- PHP 8.1 / MySQL 5.7 str_split array_rand shuffle print_r
last run:
2022-11-13 07:45:25
34
- PHP 8.1 / MySQL 5.7 shuffle print_r
last run:
2023-01-11 12:30:01
21
- PHP 8.1 / MySQL 5.7 shuffle explode
last run:
2023-01-11 12:31:54
11
- PHP 8.1 / MySQL 5.7 shuffle explode
last run:
2023-01-11 12:22:51
10
- PHP 7.4 / MySQL 5.7 shuffle
last run:
2023-01-02 14:41:28
9
- PHP 8.1 / MySQL 5.7 str_split array_rand shuffle print_r
last run:
2022-11-12 16:24:26
9
- PHP 8.1 / MySQL 5.7 str_split array_rand shuffle print_r
last run:
2022-11-12 16:11:20
9
- PHP 8.1 / MySQL 5.7 shuffle explode
last run:
2023-01-11 12:28:57
8
- PHP 7.4 / MySQL 5.7 shuffle
last run:
2023-01-02 15:01:19
8
- PHP 7.4 / MySQL 5.7 shuffle
last run:
2023-01-02 14:38:03
8
shuffle - New snippets
-
PHP 8.1 / MySQL 5.7 shuffle print_r
added at:
2023-01-11 12:36:32
7
-
PHP 8.1 / MySQL 5.7 shuffle explode
added at:
2023-01-11 12:31:42
11
-
PHP 8.1 / MySQL 5.7 shuffle
added at:
2023-01-11 12:29:22
2
-
PHP 8.1 / MySQL 5.7 shuffle print_r
added at:
2023-01-11 12:28:50
21
-
PHP 8.1 / MySQL 5.7 shuffle print_r
added at:
2023-01-11 12:27:29
1
-
PHP 8.1 / MySQL 5.7 shuffle print_r
added at:
2023-01-11 12:26:00
1
-
PHP 8.1 / MySQL 5.7 var_dump explode shuffle print_r
added at:
2023-01-11 12:24:23
1
-
PHP 8.1 / MySQL 5.7 var_dump explode shuffle print_r
added at:
2023-01-11 12:23:50
1
-
PHP 8.1 / MySQL 5.7 shuffle explode
added at:
2023-01-11 12:22:20
10
-
PHP 8.1 / MySQL 5.7 shuffle explode print_r
added at:
2023-01-11 12:20:54
1