Anybody please tell me. I want know the different between the
I search from php.net unable to get the answers I need.
execonly returns the last line of the generated output.
shell_execreturns the full output of the command, when the command finished running.
systemimmediately shows all output, and is used to show text.
passthrualso returns output immediately, but is used for binary data.
passthrudisplays raw data.
shell_exec it is possible to handle the output yourself, while
passthru won’t let you customize it and immediately display the output.
A more detailed comparison can be found here.
passthru is used for returning binary data instead of ascii. A typical example is where an image manipulation program is returning an image instead of text data.
See PHP – exec() vs system() vs passthru() for more info
Also see php shell_exec() vs exec().