I've found this quite useful for simulating various kinds of shuffles with cards. It is humorous but can imitate multiple deck cuts and other (imperfectly) random events.
<?php
function truffle_shuffle($body, $chunklen = 76, $end = "\r\n")
{
$chunk = chunk_split($body, $chunklen, "-=blender=-");
$truffle = explode("-=blender=-",$chunk);
$shuffle = shuffle($truffle);
$huknc = implode($end,$shuffle);
return $huknc;
}
?>