&reftitle.examples; Random Example getBytesFromString('abcdefghijklmnopqrstuvwxyz0123456789', 16) ); // Shuffle array: $fruits = [ 'red' => '🍎', 'green' => '🥝', 'yellow' => '🍌', 'pink' => '🍑', 'purple' => '🍇' ]; echo "Salad: ", implode(', ', $r->shuffleArray($fruits)), "\n"; // Shuffeling array keys $fruits = [ 'red' => '🍎', 'green' => '🥝', 'yellow' => '🍌', 'pink' => '🍑', 'purple' => '🍇' ]; $keys = $r->pickArrayKeys($fruits, 2); // Look up the values for the picked keys. $selection = array_map( static fn ($key) => $fruits[$key], $keys ); echo "Values: ", implode(', ', $selection), "\n"; ?> ]]> &example.outputs.similar;