We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon, Zephir exec() Rscript (R language)

Hi, I plan to develop an application based on the Phalcon PHP Framework, PHP application needs to communicate with Rscript program to execute scripts written in the R language.

Normally I can use exec() PHP function

exec("Rscript statistic.R $my_input");

What interests me is it possible in the Zephir language to use exec() or another command to execute other programs and scripts?

We need a maximum speed of communication between php and Rscript.

thank you



98.9k
Accepted
answer

You can use any PHP function in Zephir without problem: https://php.net/manual/en/function.exec.php

BTW, Remember that Zephir has its own forum: https://forum.zephir-lang.com/