Re: Reuse PHP functions in a third-party application
| From: | Robert Enyedi | Date: | Wed, 21 Mar 2007 08:34:19 +0000 |
| Subject: | Re: Reuse PHP functions in a third-party application | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250989@lists.php.net to get a copy of this message | ||
Richard,
Thanks for the info. Under these circumstances I suppose that the CGI calling mode is the best suited.
On the other hand this option might raise some performance penalty. I wonder if better performance could be achieved if I would use a socket based call interface to my module running inside the running PHP server.
Regards,
Robert
Richard Lynch wrote:
On Tue, March 20, 2007 5:27 am, Robert Enyedi wrote:I'm not very familiar with the internal architecture of the Zend PHP engine nor with the PHP module mechanism, but can you reuse compiled PHP modules in other applications? Is there a way of calling the functions of a compiled module from a third party C application?Probably not... I suppose that Prioblender thingie or one of the compilers might be able to be hacked with a PHP CLI binary to kind of do that, but a base PHP install doesn't ever actually store the opcodes anywhere in a compiled form as you are imagining. Even the various Caches only store opcode, and not machine code/binaries, so you still need the Zend Engine to rip through and execute them somewhere somehow, I think. Of course, you could use PHP to provide REST, SOAP, WebDAV, etc