There are several ways you can run external programs.
exec, system, passthru and backticks.
These just run a command like
/usr/local/bin/myprogram -t tick -p plop -b bllcks
and depending on which PHP command you used to execute the program, you'll get one line of output, all the output, or no output.
Note that the above-mentioned commands are one-shot commands.
You can only send parameters once, through the commandline.
After that you can't 'talk' to the program anymore.
If you have a more advanced program that needs data throughout it's execution, you'll need to look into stdin/stdout connections, or even sockets.
That way you can start a program and continue to interact with it by sending data or commmands while the external script is running.
Easy is not a word I'd use to describe this method, but it can be done.