PHP/Math/Random
mt_rand with no arguments
<source lang="html4strict">
<?
print("Seeding the generator
");
mt_srand((double)microtime() * 1000000);
print("With no arguments: " . mt_rand() . "
");
print("With no arguments: " . mt_rand() . "
");
print("With no arguments: " . mt_rand() . "
");
?>
</source>
mt_rand with two arguments
<source lang="html4strict">
<?
print("Seeding the generator
");
mt_srand((double)microtime() * 1000000);
print("With two arguments: " .mt_rand(27, 31) . "
");
print("With two arguments: " .mt_rand(27, 31) . "
");
print("With two arguments: " .mt_rand(27, 31) . "
");
?>
</source>