D
D
droit1742018-02-14 10:36:57
PHP
droit174, 2018-02-14 10:36:57

How to find out why the execution of a php script is interrupted?

noticed interruptions in the execution of the php script in cycles.
I run in console.
does not display any errors, windows 10 x64, 8GB memory, i7-4500U 1.80GHz processor
sample code

error_reporting (E_ALL);
set_time_limit(0);
for($i = 0; $i < 5000 ;$i++ ){
     echo $i.' ';
}

The cycle never ends. It always breaks in different places. It can also break at 5.
The foreach loop is exactly the same.
Tell me which way to dig in my first race.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Justique, 2018-02-14
@Justique

try {
    for($i = 0; $i < 5000 ;$i++ ){
      echo $i.' ';
    }
} catch (Exception $e) {
    echo  $e->getMessage(), "\n";
}

I also assume that max_excecution_time is not enough

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question