I have a lot of mathematical calculations in my PHP script, which can be quite slow at times. I\'m wondering if it\'s possible to pass data from PHP to C++, do the calculati
If you want to handle these asynchronously, you could take a look at Beanstalkd, which acts as a job queue, storing chunks of data to be picked up by another process for processing. So you could write a C++ process that sits there waiting for something to do, and picks up work from Beanstalkd. Beanstalkd is not only fast, but can also be distributed.
There are a couple of C(++) client libraries for beanstalkd available https://github.com/kr/beanstalkd/wiki/client-libraries.