Published May 22, 2023
Contribute to Docs
str_shuffle() function randomly shuffles a string. It generates a different order of characters each time it is called.
$stringis the string to be shuffled.
This example demonstrates the use of
str_shuffle() on a string.
Note: The output will vary each time this program is executed, as the
str_shuffle()function shuffles the string randomly. The function should not be used for cryptography, because it does not generate cryptographically secure random numbers.
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.