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 run the calculations not so often than I'd go as Oleksi says; Use PHP's exec() command to run the external C++ app which will do the work.
But, if you run the calculations intensively, like a few times per second, then the C++ app's initial execution time might incur penalties;
Then you could look at having a C++ service/app which listens on a socket or a file-pipe, from/to which you pass data between PHP and C++. This will save the EXE's startup time.