Is it possible to use C++ binaries from php

前端 未结 8 1922
囚心锁ツ
囚心锁ツ 2020-12-01 08:00

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

8条回答
  •  抹茶落季
    2020-12-01 08:38

    It is possible to write php extensions in C++ (but you must also write C facade). It isn't trivial, and I'd say, that if you ask instead of looking into PHP code, you're not so familiar with C and how PHP works inside, and due to it's bad documentation it is a bad idea for you to write library in C.

    EDIT: there is a ... some basic tutorial on zend. http://devzone.zend.com/node/view/id/1021 , as I'm looking into it, maybe the documentation changed since my PHP times :)

提交回复
热议问题