Andy: Zufallsystem - Wieso microtime?

Beitrag lesen

<?php
SESSION_START();
SESSION_REGISTER("lids");

print "LIDS: $lids<br>";

$max = '5';

zufall();
function zufall ()
{
 global $max, $id, $lids, $lid;

mt_srand ((double)microtime()*1000000);
 $id = mt_rand(0,$max);

$exp_lids = explode("|", $lids);
 $count = count($exp_lids)-1;
 for ($i=0; $i <= $count; $i++)
 {
  $lid = $exp_lids[$i];
  if ($lid == $id) zufall();
 }
}

$lids = $id."|".$lids;

print "ID: $id<br>";
?>

ist das nicht die perfekte lösung?