Re: [PHP4BETA] compiler ?

From: Date: Fri, 30 Jul 1999 12:29:48 +0000
Subject: Re: [PHP4BETA] compiler ?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2967@lists.php.net to get a copy of this message
At 09:03 30/07/99 , Douglas Liu wrote:
hi all:
    after experiencing the power of PHP 4.0 + zend
    I am wondering what does a "compiler" stand in the whole architecture.
    We are still writing scripts, aren't we ?
    I personnaly assumed that the compiler functions
    when a script is executed, like the JIT compiler tech in Java.
    is that so ?
It's not like JIT in Java at all. Zend (PHP 4.0's engine) compiles the script and executes it immediately afterwards, in a way that is completely transparent to the end user. You're definitely still writing scripts - it's just that the underlying technology that executes it changed completely.
    further, another thing that confuses me is that zend'll execute some
    machine independent intermediate codes in the future release.
    that means zend understands machine independent binary codes and
    scripts as well ?
    so what about the efficiency issue between the above two ?
Yes, but I think you think way too much of what 'understanding' platform independent intermediate code is. It means nothing but having a loader that was written to understand files across platforms. There's little efficiency gain from precompiling scripts, mostly because the Zend compiler is extremely quick on its own. On a busy site - it may make a difference, but my estimate is that it usually won't. The compiler's primary function would be to compile your scripts so that people won't be able to read them, if you wish to keep the source for yourself, for whatever reason. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#2967) next »