Re: Embedding PHP, few additional questions.

From: Date: Thu, 26 Jun 2014 10:14:39 +0000
Subject: Re: Embedding PHP, few additional questions.
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-75086@lists.php.net to get a copy of this message
Hi, On Thu, 2014-06-26 at 11:50 +0200, Ingwie Phoenix wrote: > I am working on a nodejs module that allows to embed PHP (to use it > within HTTP servers, for example). I wish to extend with a small > thing. Instead of starting, running and shutting down the engine, I > would like to keep it running, and just reset its state. Why? I > *think* that this would keep my OPCache. Sadly, I did not find any > documentation on how OPCache saved its…cache. Its just ment as a > matter of speed improvement. > > How can I just reset the engine, without shutting it down? I don't now what you mean by "reset" PHP is meant to serve requests, one after another, where each request has its own context. Probably youwant to run request cycles? > The embedding instructions that I will use are here: > http://phi.lv/?p=376 This sees to use the high level embed APIs. Use php_request_startup(TSRMLS_C); ... php_request_shutdown((void *) 0); style loops. See embed API implementation, and a simple SAPI like https://github.com/johannes/pconn-sapi/blob/master/pconnect-sapi.c#L180 johannes

« previous php.internals (#75086) next »