E
E
EvgMul2016-05-30 23:47:56
PHP
EvgMul, 2016-05-30 23:47:56

How to stop and restart script execution?

Is it possible in PHP to stop the script execution in a loop and restart its execution again?
Thanks in advance to all who respond.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
display: block, 2016-05-30
@qork

stop the break loop. stop script execution exit or end. re-execute goto ...

A
Alexey, 2016-05-30
@alsopub

If before the loop there was no output to the screen, then something like this:

for (....) {

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

}

N
novrm, 2016-05-31
@novrm

Может немного вбок, однако: PHP создан, чтобы умирать...
Сделав бесконечный цикл вы столкнетесь с утечкой памяти...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question