Currently I use PHP-FPM with NGINX for front end requests but also run some background processes through a long running PHP script using exec to run other scripts with the c
Very late to this question (4 years) but the correct answer is cgi-fcgi which will let you pass commands and execute code in the already-in-memory php-fpm