symisc / PH7

An Embedded Implementation of PHP (C Library)
http://ph7.symisc.net
Other
494 stars 68 forks source link

Add foreign class #30

Closed morpheouss closed 5 years ago

morpheouss commented 5 years ago

Is it possible to add foreign class into PH7? I know there is ph7_create_function that allows to add foreign function. Same available for constant. Can be done for class too?

symisc commented 5 years ago

Nope, but you create create a dummy class inside your PHP code and let each method of the class make a call to a foreign function implemented in your C code.