On Mon, Oct 6, 2008 at 1:53 PM, Eric Butera <[EMAIL PROTECTED]> wrote:
> On Sun, Oct 5, 2008 at 2:25 PM, Janek <[EMAIL PROTECTED]> wrote:
>> I wonder whether I can rely on the stability of mt_srand() and
>> mt_rand(). I want them to generate the same sequence for a fixed seed,
>> regardless of PHP
On Sun, Oct 5, 2008 at 2:25 PM, Janek <[EMAIL PROTECTED]> wrote:
> I wonder whether I can rely on the stability of mt_srand() and
> mt_rand(). I want them to generate the same sequence for a fixed seed,
> regardless of PHP version. Do you think I can trust it?
> Janek
>
> --
> PHP General Mailing L
> fair point; I've been trying to change my mindset on this of late, but there
> is no replacement for simply writing you're own code. Well said.
How many numbers are you likely to need?
--
Richard Heyes
HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph
--
PHP Gen
Stut wrote:
On 6 Oct 2008, at 10:58, Nathan Rixham wrote:
Janek wrote:
On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:
On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:
I know, but I *want* to seed it. My goal is to have a fixed
pseudorandom sequence for each integer
On 6 Oct 2008, at 10:58, Nathan Rixham wrote:
Janek wrote:
On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:
On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:
I know, but I *want* to seed it. My goal is to have a fixed
pseudorandom sequence for each integer (seed) and I
Janek wrote:
On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:
On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:
I know, but I *want* to seed it. My goal is to have a fixed
pseudorandom sequence for each integer (seed) and I don't want those
sequences to change regarding
Janek schreef:
> On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
> <[EMAIL PROTECTED]> wrote:
>> On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:
>>> I know, but I *want* to seed it. My goal is to have a fixed
>>> pseudorandom sequence for each integer (seed) and I don't want those
>>> sequences to
On Sun, Oct 5, 2008 at 10:05 PM, Ashley Sheridan
<[EMAIL PROTECTED]> wrote:
> On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:
>> I know, but I *want* to seed it. My goal is to have a fixed
>> pseudorandom sequence for each integer (seed) and I don't want those
>> sequences to change regarding PHP v
On Sun, 2008-10-05 at 21:57 +0200, Janek wrote:
> I know, but I *want* to seed it. My goal is to have a fixed
> pseudorandom sequence for each integer (seed) and I don't want those
> sequences to change regarding PHP version.
>
> Janek
>
> On Sun, Oct 5, 2008 at 9:52 PM, Richard Heyes <[EMAIL PRO
I know, but I *want* to seed it. My goal is to have a fixed
pseudorandom sequence for each integer (seed) and I don't want those
sequences to change regarding PHP version.
Janek
On Sun, Oct 5, 2008 at 9:52 PM, Richard Heyes <[EMAIL PROTECTED]> wrote:
>> I wonder whether I can rely on the stabilit
> I wonder whether I can rely on the stability of mt_srand() and
> mt_rand(). I want them to generate the same sequence for a fixed seed,
> regardless of PHP version. Do you think I can trust it?
> Janek
Keep in mind (if you're not already) that mt_rand() doesn't
technically need to be seeded.
--
I wonder whether I can rely on the stability of mt_srand() and
mt_rand(). I want them to generate the same sequence for a fixed seed,
regardless of PHP version. Do you think I can trust it?
Janek
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Maybe I'm wrong on this but mt_rand doesn't seem to be random enough.
I'm on a PHP 4.04 server and here's my code..
function make_seed() {
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 10);
}
mt_srand(make_seed());
$randval = mt_rand();
I pul
Is there a way to seed the mt_rand function with numbers and letters to
generate a good password of say 6-10 characters?
Thanks
Phillip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
14 matches
Mail list logo