Güzel bir fonksiyon oldu

<?
function myRandom($min, $max, $isLetter = false, $minLetter = 'a', $maxLetter = 'z'){
    $rand           = rand($min, $max);
    if ($isLetter) {
        $rangeLetter    = range($minLetter,  $maxLetter);
        $countLetter    = count($rangeLetter);
    }
    for($i = 0; $i < $rand; $i++){
        if(rand(0, 1) == 1){
             $temp.=rand(0, 9);
        }elseif($isLetter){
            $temp.=$rangeLetter{rand(0, $countLetter - 1)};
        }
    }
    return $temp;
}

echo myRandom(10, 50, true, 'a', 'f');
echo "<br>";
echo myRandom(20, 50);
echo "<br>";
echo myRandom(10, 50, true);
?>
Diğer verilen kodlarda çalışıyor...