If you're running your PHP script from the command-line, passthru()
has one large benefit. It will let you execute scripts/programs such as vim
, dialog
, etc, letting those programs handle control and returning to your script only when they are done.
If you use system()
or exec()
to execute those scripts/programs, it simply won't work.
Gotcha: For some reason, you can't execute less
with passthru()
in PHP.