PHP-Code:
<?
for($i=0;$i<1000;$i++){
$a[] =a;
}
for($i=0;$i<=100000;$i++){
$x = array_rand($a);
$xy[$x] +=1;
#echo $x."\n";
}
#ksort ($xy);
#print_r($xy);
echo "\n Count 1:".count($xy) ." Summe: ". array_sum($xy);
echo "\n Count 2:".count($a);
?>
Code:
Count 1:61 Summe: 100001 Count 2:1000
[...]
[553] => 1613
[436] => 1613
[674] => 1613
[794] => 3226
[288] => 1613
[215] => 1613
[589] => 1613
[321] => 1613
[715] => 1613
[441] => 1613
[869] => 1613
[834] => 1613
[373] => 1613
[353] => 1613
[585] => 1613
[376] => 1613
[...]
[719] => 1612
[...]
PHP Version 4.3.9
Ist das ein Bug oder mach ich was falsch?
Kommentar