Asked in
PHP Programming

Why are random numbers useful in PHP?

Answer

User Avatar
Wiki User
June 03, 2009 11:41PM

Random numbers can be used for many different things.

Personally i use the rand() directive for security measures to define a session identifier.

Also i use the rand feature (sometimes) for user authentication while using captcha images.

basically, when you need a random number, use rand() ;)