--- /dev/null
+<?php
+$rands = array();
+$max_iter = 500000;
+$max_rand = 200000;
+
+print 'max_iter=' . $max_iter . ',max_rand=' . $max_rand . PHP_EOL;
+
+for ($idx = 0; $idx < $max_iter; $idx++) {
+ $number = mt_rand(0, $max_rand);
+ if (isset($rands['mt_rand'][$number])) {
+ $rands['mt_rand'][$number]++;
+ } else {
+ $rands['mt_rand'][$number] = 1;
+ }
+
+ $number = rand(0, $max_rand);
+ if (isset($rands['rand'][$number])) {
+ $rands['rand'][$number]++;
+ } else {
+ $rands['rand'][$number] = 1;
+ }
+}
+
+print 'mt_rand=' . count($rands['mt_rand']) . PHP_EOL;
+print 'rand=' . count($rands['rand']) . PHP_EOL;