Is it possible to write some C or C++ code and compile to binaries, then use those binaries with php? Is it also possible to write a php library using C and C++ ?
If so, please tell how can I do so?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP is modular in design — it consists of the ‘engine’ and many extensions, some of which are essential (e.g. the ‘standard’ extension) and some are optional. They can be compiled-in or loaded dynamically (via php.ini settings or the
dl()function).You can easily write your own PHP extension in C/C++, if you are willing to learn the API. Start with the documentation on how to ‘hack the Zend Engine’.