Re: A Few Noob Questions [message #175135 is a reply to message #175132] |
Tue, 16 August 2011 17:24 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma:
|
Senior Member |
|
|
Man-wai Chang wrote:
> On 16/08/11 11:02 PM, eBob.com wrote:
>> Is "script" official terminology in PHP? The book I am reading says
>> "Built-in superglobal variables are visible everywhere within a script."
>> but has never explicitly defined "script". (Although there is a hint
>> that maybe everything between tags is a script.)
>
> In the old days, "Programs" were compiled into binary codes for direct
> execution by the CPU. "Scripts" were not compiled, but interpreted by a
> program called intepreter.
Contrary to popular belief, scripts, i. e. programs written in a scripting
language, are compiled, too. They are *JIT-compiled* *at runtime*.
PHP 4+ scripts are compiled by the Zend Engine (a virtual machine, currently
Zend Engine II), to Zend Opcode, a platform-independent byte code (much like
with Java). That byte code is interpreted by that VM.
See also:
- <http://php.net/manual/en/internals2.opcodes.php>
- <http://www.infoworld.com/d/developer-world/zend-hails-php-microsoft-
ibm-733>.
PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(at)news(dot)demon(dot)co(dot)uk> (2004)
|
|
|