The mt_rand() function also generates random integer but it is more powerful and generate 4 times faster than rand() function.
It using Mersenne Twister algorithm for generates random integer.
For generates high secure and faster OTP (One time Password) in our project we need mt_rand () function. For OTP integration first we need to generates a 4 digit or 6 digit number.
Let's see how to generates a 4 digit OTP with more secure and faster.
To generates a 6 digit OTP with more secure and faster.