I need to repeat an action 9999999999999999 times in PHP.
I made a for loop:
for($i = 0; $i < 9999999999999999; $i++)
But it gives me an error and it does not execute the loop. How can I solve it?
I need to repeat an action 9999999999999999 times in PHP.
I made a for loop:
for($i = 0; $i < 9999999999999999; $i++)
But it gives me an error and it does not execute the loop. How can I solve it?
One possibility (given the lack of information) is that you are running PHP in a 32-bit operating system, where 9999999999999999 is greater than the manageable integer maximum (the value of the constant PHP_INT_MAX
, which in 32 bits is 2147483647 , and in 64 bits it is 9223372036854775807)