Whether PHP is an interpreted language or a compiled language

Source: Internet
Author: User
Tags apc
Is PHP an interpreted language? After using APC? Is PHP an interpreted language? After using APC?

Reply content:

Is PHP an interpreted language? After using APC?

Nowadays, it is not easy to tell whether a language is interpreted.

You say PHP is an interpreted language. Facebook has developed a hiphop compiler very early, compiling PHP into C ++ and then compiling it into binary.

You say that Python is an interpreted language, and Cython is developed using python syntax and finally compiled into binary.

You say that the interpreter is an interpreted language, and the JVM-dependent big vote language is in a hurry with you.

Interpreted language can be usedA CompilerBut itStillYesInterpreted typeLanguage. The interpreter must also useCompilation principles. To determine whether a language is a compiler or interpreter, you need to check whether a Virtual Machine (Interpreter) is required for the language to run.

Generally, interpreted languages areCompileIs a bytecode, and the virtual machine dynamically executes the bytecode. To improve performance, the JIT technology can be used to dynamically translate bytecode into machine code when executing code on a virtual machine.

Because bytecode cannot run out of virtual machines, it is still an interpreted language. In short, the compilation of compiled language (compiled to machine code) occurs before running, and the compilation of interpreted language occurs at every runtime.

Some languagesAt the same timeYesCompilation typeAndInterpreted typeLanguage. You can use the interpreter during debugging and the compiler after debugging. The most famous example is Lisp. Someone once implemented the C interpreter on the Parrot Virtual Machine and supported the C99 standard.

PHP is an interpreted language. PHP Code is interpreted as opcode and then executed by the Zend engine.

Using APC only caches opcode, reducing the time required for PHP to interpret it as opcode.

Interpreted

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.