I'm aware this can appear to be a very silly question for most of the IT crowd, but I'm new at designing this kind of architecture (only developed in PHP before).
I'm building an application that makes use of a specific OS function. The end user is going to call a PHP script that in turn needs to call a C program. The latter will call OS API and return the results in the form of strings and a file pointer to the PHP script.
Now, I know I have the option to deploy this C program either as a command line tool or a daemon. Why should I choose one instead of the other?