I have some c++ OOP classes (separated files) , and I want to create objects in PHP code that can call the functions in those classes.. (PHP classes derived from c++ classes).
Because the php is not more than a scripting language, I’ve got some functions that can only writen by a low level language that has a closed relation with the hardware, (so the c++ is the best choice).
but I want to use those functions(that are without a main function) in a php code, is this possible?.
I don’t think there is any way for such close interaction.
You would have to either
Write a PHP extension in C. Related article: Extension Writing Part I: Introduction to PHP and Zend
Write an external program and run it using
exec()