Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2918

Re: A Few Noob Questions

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: A Few Noob Questions
Date 2011-08-20 15:52 -0400
Organization A noiseless patient Spider
Message-ID <j2p39p$le1$1@dont-email.me> (permalink)
References <3Ev2q.149930$AU4.73655@en-nntp-07.dc1.easynews.com> <j2e682$m3j$3@dont-email.me> <8879571.SEqChMirdb@PointedEars.de> <j2jfa5$48l$1@dont-email.me>

Show all headers | View raw


On 8/18/2011 12:40 PM, Man-wai Chang wrote:
>>> 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*.
>
> Is this real compilation? :)
>

Not in the same sense as an executable program.  Scripting languages 
like PHP and Java are compiled to an intermediate language which is 
(pretty much) hardware independent.  This intermediate code is then 
processed by another program to generate the machine code the processor 
understands.  In PHP and some other scripting languages, this is done 
every time the script is executed.  In Java and other scripting 
languages, the conversion to intermediate code is performed once and 
stored in a file.  The run-time processor just processes the 
intermediate code.

What is classically known as "compilation" is different in that it means 
the machine code itself is stored and no run-time program is required to 
execute it.  Languages such as C/C++, PASCAL and FORTRAN are compiled, 
for instance.

>> 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.
>
> So is PHP still a script?

Yes, that's one term used.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

A Few Noob Questions "eBob.com" <eBob.com@totallybogus.com> - 2011-08-16 11:02 -0400
  Re: A Few Noob Questions A.Reader <anonymously@example.com> - 2011-08-16 11:11 -0400
    Re: A Few Noob Questions The Natural Philosopher <tnp@invalid.invalid> - 2011-08-16 16:35 +0100
  Re: A Few Noob Questions Tim Streater <timstreater@greenbee.net> - 2011-08-16 17:03 +0100
  Re: A Few Noob Questions Man-wai Chang <toylet.toylet@gmail.com> - 2011-08-17 00:35 +0800
    Re: A Few Noob Questions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-08-16 19:24 +0200
      Re: A Few Noob Questions The Natural Philosopher <tnp@invalid.invalid> - 2011-08-16 23:58 +0100
        Re: A Few Noob Questions Man-wai Chang <toylet.toylet@gmail.com> - 2011-08-19 00:41 +0800
          Re: A Few Noob Questions The Natural Philosopher <tnp@invalid.invalid> - 2011-08-18 18:33 +0100
          Re: A Few Noob Questions Tim Streater <timstreater@greenbee.net> - 2011-08-18 18:39 +0100
            Re: A Few Noob Questions The Natural Philosopher <tnp@invalid.invalid> - 2011-08-18 19:09 +0100
      Re: A Few Noob Questions Man-wai Chang <toylet.toylet@gmail.com> - 2011-08-19 00:40 +0800
        Re: A Few Noob Questions The Natural Philosopher <tnp@invalid.invalid> - 2011-08-18 18:26 +0100
        Re: A Few Noob Questions A.Reader <anonymously@example.com> - 2011-08-18 13:44 -0400
        Re: A Few Noob Questions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-08-20 19:48 +0200
          Re: A Few Noob Questions Samuel Smythe <s.smythe@yahoo.com> - 2011-08-20 15:08 -0400
            Re: A Few Noob Questions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-08-20 23:31 +0200
              Re: A Few Noob Questions Samuel Smythe <s.smythe@yahoo.com> - 2011-08-20 18:37 -0400
                Re: A Few Noob Questions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-08-21 00:41 +0200
                Re: A Few Noob Questions Samuel Smythe <s.smythe@yahoo.com> - 2011-08-20 19:04 -0400
                Re: A Few Noob Questions Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-20 21:44 -0400
                Re: A Few Noob Questions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-08-21 09:16 +0200
        Re: A Few Noob Questions Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-20 15:52 -0400
  Re: A Few Noob Questions Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-08-16 21:30 +0000
    Re: A Few Noob Questions "eBob.com" <eBob.com@totallybogus.com> - 2011-08-16 20:31 -0400
      Re: A Few Noob Questions A.Reader <anonymously@example.com> - 2011-08-17 05:50 -0400
        Re: A Few Noob Questions "eBob.com" <eBob.com@totallybogus.com> - 2011-08-18 10:12 -0400

csiph-web