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 range shuffle print_r
added at:
2024-03-20 05:05:19
1
-
PHP 8.1 / MySQL 5.7 range shuffle print_r
added at:
2024-03-20 05:03:48
1
-
PHP 8.1 / MySQL 5.7 range shuffle print_r
added at:
2024-03-20 05:03:00
1
-
PHP 8.1 / MySQL 5.7 range shuffle print_r range shuffle print_r
added at:
2024-03-20 05:02:37
2
-
PHP 8.1 / MySQL 5.7 range shuffle print_r
added at:
2024-03-20 04:59:38
1
-
PHP 8.1 / MySQL 5.7 range shuffle
added at:
2024-03-20 04:57:53
1
-
PHP 8.1 / MySQL 5.7 range shuffle array_fill print_r
added at:
2024-02-12 11:42:32
2
-
PHP 8.1 / MySQL 5.7 range shuffle array_fill print_r
added at:
2024-02-12 11:40:49
2
-
PHP 8.1 / MySQL 5.7 range shuffle array_fill print_r
added at:
2024-02-12 11:35:00
1