I'm currently thinking about writing an online simulation game ( bunch of variables linked by formulas, all in a time-base ) and want it to be presented in PHP but written in C++. My question therefore is, is there a way in which PHP and C++ can directly communicate, or an indirect way better than having C++ write a file containing the game's orders, and this file being read by PHP ?

Thanks for your time.