Does anybody know why the php3's rand() and standard linux rand() generate different numbers after srand(x) where x is the same for php and C ? I've looked at the source of php rand() in rand.c, but I didn't find any reasons, why it doesn't work.
Umm, "generate a different sequence" and "didn't work" aren't really synonymous. Can you elaborate a little more on the "doesn't work" aspect of php rand()? Or, as an alternative, why not use mt_rand(), which is faster and better?
Never mind, it appeared that php interpreter I have uses lrand48(), and I thought that it uses rand(), that's why I was asking.
OK, but the advice about mt_rand() probably still applies.