0

PHP execution timed out

Hello, I was playing with the "do ...while" loop and tried to see what happen if I increased a number to infinity. When I runned the code, the error message "execution timed out" appeared. I guess it is because the code wouldn't echo number to the infinite, but I was wondering how is the "execution time out" working? Can we set the time out after a certain time (for ex 3 seconds), or by a number of output (for ex. output only the 100 first results). And how to do so? The code I tried is as follows: https://code.sololearn.com/wSpdej0HWQex/?ref=app

3rd Sep 2022, 3:38 PM
Cedric
Cedric - avatar
2 Answers