Yeah, it's already built and it's called Zend Encoder.

On Mon, 26 Nov 2001, Yermo M. Lamers wrote:
> 
> Markus,
> 
> Yea, that's the problem. In my application, just loading the class files
> on each page adds quite a bit of overhead. (1000's of lines of code).
> 
> I've taken a look through the PHP/Zend source and it looks to me like it
> would be possible to create a module built around a modified version of 
> php_execute_script() that:
> 
>    1. loads, compiles and executes a script.
> 
>    2. saves the state of the global tables Zend uses to
>       manage class definitions, objects, functions, variables, etc
>       (since there are so many globals used in Zend it doesn't look
>       like you can instantiate a second instance of the PHP interpreter
>       inside a single process, correct?)
> 
>    3. exports some function calls to PHP that would allow object instances
>       (and their corresponding class definitions) to be imported into
>       the local name space.
> 
> Ideally I'd set the module up so that all these classes and instantiation
> happen in the php.ini file at server start time. Now wouldn't that be
> cool?
> 
> The question I have is what other hooks are there inside PHP that would
> prevent this from working? Can I copy a pre-built symbol table (and class
> definition table, etc) that I saved from a previous run of the PHP
> interpreter (on a previous page) into a new one without having it crash?
> 
> thanks,
> 
> -- Yermo
> 
> On Mon, 26 Nov 2001, Markus Fischer wrote:
> 
> > On Mon, Nov 26, 2001 at 12:18:23PM -0500, Yermo M. Lamers wrote : 
> > > Question for you, when you serialize to a file do the class definitions
> > > get serialized along with it or do you have to pre-load your classes
> > > before you can unserialize? (that seems to be the way it works but I may
> > > be mistaken).
> > 
> >     Class definition is not safed.
> > 
> >     - Markus
> > 
> 
> ---------------------------------------------------------------------
> DTLink Software                                       [EMAIL PROTECTED]
> Software Development and Consulting
> ---------------------------------------------------------------------
> 
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-Andrei

Give a man a fish; you have fed him for today.  Teach a man to use
the Net and he won't bother you for weeks.
                                           -Author unknown

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to