I have a c++ program which has to return a string. Since the main method in C++ cannot return a string, I am returning the string through a user-defined function. How can I invoke this function from my php script. I know exec() command can call a C++ program but is there a way I can call a specific function?
scenario:
int main()
{
string myfunc(){
....
return string;
}
return 0;
}
How can I call the myfunc() from PHP?