扩展PHP以与R编程语言进行通信

I'm on a road to build a PHP extension module to allow PHP to communicate with the R programming language.

My objective for this module is to allow me to run some R function directly from PHP.

I haven't build any extension on PHP before, but I know how to write a php program. I know a little bit about C and C++

I'm interested to hear what the expert advice on this one.

Here's some of the questions I want to know:

  1. Is it possible to achieve the above idea?
  2. What tools do I need?
  3. What is the effective way to do this?

Please use the search feature at the top-right before you post.

Similar questions have been asked before, see e.g.

and there are probably more.