If I have a while loop and inside it I execute a php file via system(), and let's say this php file takes long to finish (e.g. downloading images, etc), will the main script wait for that to finish until going to the next loop?
Now it looks like it's indeed waiting for the current script to finish before going to the next one but I just want to make sure. Maybe someone who knows the internals of PHP can shed some light.
Thanks.
System executes the command and then hangs until the command is executed.
Note:
If a program is started with this function, in order for it to continue running in the background, the output of >the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the >execution of the program ends.
From the manual: http://php.net/manual/en/function.system.php