How each of the PHP functions works:
pcntl_exec('/caminho/executar');
exec('/caminho/executar');
shell_exec('/caminho/executar');
Is there any uniqueness among the 3 examples mentioned above?
Although it is clear thatexec()
is to execute program directly, shell_exec()
can also execute a program through command line, and pcntl_exec()
that also runs program, but it has something to do with process , which I did not quite understand.
The PHP documentation did not direct me very well to understand these differences: pcntl_exec , exec and shell_exec .