How to stop and restart the script?

Is there a possibility in PHP in a loop to stop script execution altogether and restart it to run again?
Thanks in advance to all responded.
July 9th 19 at 10:20
3 answers
July 9th 19 at 10:22
to stop the cycle break. stop execution of a script exit or end. to restart goto ...
Probably not quite true pointed question. In the loop is the condition under which the script should stop and the server should send a new request to the same page.
Can somehow this be implemented? - Wilhelm_Marquardt commented on July 9th 19 at 10:25
header('Location: '.$_SERVER['PHP_SELF']); exit; - evie.Feil6 commented on July 9th 19 at 10:28
July 9th 19 at 10:24
If the cycle was not displayed on the screen something like this:
for (....) {

 if (....) {
 header('Location: '.$_SERVER{'REQUEST_URI'}.'?'.rand());

July 9th 19 at 10:26
Maybe a little sideways, however: PHP is created to die...
Making an infinite loop you will encounter the memory leak...

Find more questions by tags PHPJoomla