Hey there!

So basically, as you could probably have figured out from my title, I am looking for some information in regard to the PHP function, Rand().

I'm looking for as much information into exactly how it works, and the accuracy and predictability of the pseudo-randomness.

I am working with Rand(0,1) in specific, and I am basically looking to predict the outcome of using Rand().

Some information about the seeds, and especially about how many values will be outputted until the algorithm repeats, would be appreciated.

Thank you!

Recommended Answers

All 4 Replies

Or, since nobody seems to know this and I can't find it anywhere....
Does anyone know how I can see the programming behind the function Rand()?

Or perhaps the algorithm it uses?

This is very important to me! Thank you!

Yes I did, but they are all about using Rand() to create password generators and other functions, none of them even brush upon the seeding, the algorithm, or the programming.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.