PHP exec() vs system() vs passthru()

What are the differences?

Is there a specific situation or reason for each function? If yes, can you give some examples of those situations?

PHP.net says that they are used to execute external programs. see reference
From the examples I see, I don’t see any obvious difference.

If I were to simply run a script (bash or python), which function do you recommend me to use?

5 Answers
5

Leave a Comment