However, there are a few situations where programs are likely to want to call "srand". One is for generating predictable results, generally for testing or debugging. There, you use "srand($seed)", with the same $seed each time.