What PHP function can be used to shuffle the order of characters in a string?

To shuffle the order of characters in a string in PHP, you can use the str_shuffle() function. This function takes a string as input and returns a new string with the characters shuffled randomly. This can be useful for creating randomized strings or for adding an element of unpredictability to your application.

$string = "Hello World";
$shuffledString = str_shuffle($string);
echo $shuffledString;