I have this line of code that when executed in the console generates random numbers of 16 characters:
1e16 * Math.random()
When executing you can give this kind of results:
1e16 * Math.random() //8988522134496624
As you can see, it generates the 16-digit number. My question is, how can I achieve this in PHP?
for now I have this and nothing that works:
function random() {
return rand(1e16, 100000000000000) / 1e16;
}
echo random();
// this is the error
Warning: rand () expects parameter 1 to be integer, float given in C: \ xampp \ htdocs \ demo \ test.php on line 3 '