I just wanted to clarify, does PHPs exec() function always wait for whatever command to finish? Like for example, exec('wget http://some-random-domain/videos/video/largevideo.mp4'); PHP: Say the mp4 file is 100MB, will it wait to download that before continuing with the script? I plan on doing something like this, maybe even ffmpeg related where things need to be processed, but I just don't want to start something and have my PHP script try to do something when it hasn't yet been downloaded/processed.
yes it will wait until whatever you are providing as parameter has finished. doesn't matter if it succeeds or fails.