Zend Engine

Last updated

Zend Engine
Zend Engine logo.png
Original author(s) Andi Gutmans, Zeev Suraski
Developer(s) Zend Technologies, The PHP Development Team
Initial release1999
Stable release
3.4 (PHP 7.4)
4.0 (PHP 8.0)
Repository github.com/php/php-src [1]
Written in C
Type Scripting engine
License Zend Engine License (some parts are under the PHP License)
Website www.zend.com

The Zend Engine is a compiler and runtime environment for the PHP scripting language and consists of the Zend Virtual Machine, which is composed of the Zend Compiler and the Zend Executor, that compiles and executes the PHP code. [2] It was originally developed by Andi Gutmans and Zeev Suraski while they were students at the Technion – Israel Institute of Technology. They later founded a company called Zend Technologies in Ramat Gan, Israel. The name Zend is a combination of their forenames, Zeev and Andi.

Contents

The first version of the Zend Engine appeared in 1999 in PHP version 4. [3] It was written in C as a highly optimized modular back-end, which for the first time could be used in applications outside of PHP. The Zend Engine provides memory and resource management, and other standard services for the PHP language. Its performance, reliability and extensibility played a significant role in PHP's increasing popularity.

This was followed by Zend Engine 2 at the heart of PHP 5.

This was followed by Zend Engine 3, originally codenamed phpng, which was developed for PHP 7 and significantly improves performance. [4]

The newest version is Zend Engine 4, which was developed for PHP 8.

The source code for the Zend Engine has been freely available under the Zend Engine License (although some parts are under the PHP License) since 1999, [5] as part of the official releases from php.net, as well as the official git repository or the GitHub mirror. Various volunteers contribute to the PHP/Zend Engine codebase.

Architecture

Zend Engine is used internally by PHP as a compiler and runtime engine. PHP Scripts are loaded into memory and compiled into Zend opcodes. These opcodes are executed and the HTML generated is sent to the client. [6]

To implement a Web script interpreter requires three parts:

  1. The interpreter part analyzes the input code, translates it, and executes it.
  2. The functionality part implements the functionality of the language (its functions, etc.).
  3. The interface part talks to the Web server, etc.

Zend takes part 1 completely and a bit of part 2; PHP takes parts 2 and 3.

Zend itself really forms only the language core, implementing PHP at its very basics with some predefined functions.

See also

Related Research Articles

<span class="mw-page-title-main">PHP</span> Scripting language created in 1994

PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP reference implementation is now produced by The PHP Group. PHP originally stood for Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor.

Parrot was a register-based process virtual machine designed to run dynamic languages efficiently. It is possible to compile Parrot assembly language and Parrot intermediate representation to Parrot bytecode and execute it. Parrot is free and open source software.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

<span class="mw-page-title-main">Zend (company)</span>

Zend, formerly Zend Technologies, is a Minneapolis, Minnesota-based software company. The company's products, which include Zend Studio, assist software developers with developing, deploying, and managing PHP-based web applications.

JScript .NET is a .NET programming language developed by Microsoft.

IronPython is an implementation of the Python programming language targeting the .NET Framework and Mono. Jim Hugunin created the project and actively contributed to it up until Version 1.0 which was released on September 5, 2006. IronPython 2.0 was released on December 10, 2008. After version 1.0 it was maintained by a small team at Microsoft until the 2.7 Beta 1 release. Microsoft abandoned IronPython in late 2010, after which Hugunin left to work at Google. The project is currently maintained by a group of volunteers at GitHub. It is free and open-source software, and can be implemented with Python Tools for Visual Studio, which is a free and open-source extension for Microsoft's Visual Studio IDE.

<span class="mw-page-title-main">Andi Gutmans</span> Israeli businessman

Andi (Andrei) Gutmans is an Israeli programmer and entrepreneur.

<span class="mw-page-title-main">Zeev Suraski</span> Israeli computer scientist

Zeev Suraski is an Israeli programmer, PHP developer and co-founder of Zend Technologies. A graduate of the Technion in Haifa, Israel, Suraski and Andi Gutmans created PHP 3 in 1997. In 1999 they wrote the Zend Engine, the core of PHP 4, and founded Zend Technologies, which has since overseen PHP advances. The name Zend is a portmanteau of their forenames, Zeev and Andi.

Zend Studio is a commercial, proprietary integrated development environment (IDE) for PHP developed by Zend Technologies, based on the PHP Development Tools (PDT) plugin for the Eclipse platform.

Active Scripting is the technology used in Windows to implement component-based scripting support. It is based on OLE Automation and allows installation of additional scripting engines in the form of COM modules.

Laminas Project is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based packages. The framework uses various packages by the use of Composer as part of its package dependency managers; some of them are PHPUnit for testing all packages, Travis CI for continuous Integration Services. Laminas provides to users a support of the model–view–controller (MVC) in combination with Front Controller solution. MVC implementation in Laminas has five main areas. The router and dispatcher functions to decide which controller to run based on data from URL, and controller functions in combination with the model and view to develop and create the final web page.

<span class="mw-page-title-main">V8 (JavaScript engine)</span> Open-source JavaScript engine developed by Google

V8 is a free and open-source JavaScript engine developed by the Chromium Project for Google Chrome and Chromium web browsers. The project’s creator is Lars Bak. The first version of the V8 engine was released at the same time as the first version of Chrome: 2 September 2008. It has also been used on the server side, for example in Couchbase and Node.js.

<span class="mw-page-title-main">.NET Framework</span> Software platform developed by Microsoft

The .NET Framework is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until being superseded by the cross-platform .NET project. It includes a large class library called Framework Class Library (FCL) and provides language interoperability across several programming languages. Programs written for .NET Framework execute in a software environment named the Common Language Runtime (CLR). The CLR is an application virtual machine that provides services such as security, memory management, and exception handling. As such, computer code written using .NET Framework is called "managed code". FCL and CLR together constitute the .NET Framework.

Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on a JavaScript Engine and executes JavaScript code outside a web browser, which was designed to build scalable network applications. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser. Consequently, Node.js represents a "JavaScript everywhere" paradigm, unifying web-application development around a single programming language, rather than different languages for server-side and client-side scripts.

GraalVM is a Java VM and JDK based on HotSpot/OpenJDK, implemented in Java. It supports additional programming languages and execution modes, like ahead-of-time compilation of Java applications for fast startup and low memory footprint. The first production-ready version, GraalVM 19.0, was released in May 2019. The most recent version is GraalVM 22.1.0, made available in April 2022.

HipHop Virtual Machine (HHVM) is an open-source virtual machine based on just-in-time (JIT) compilation that serves as an execution engine for the Hack programming language and used to support PHP execution before the release of HHVM version 4. By using the principle of JIT compilation, Hack code is first transformed into intermediate HipHop bytecode (HHBC), which is then dynamically translated into x86-64 machine code, optimized, and natively executed. This contrasts with PHP's usual interpreted execution, in which the Zend Engine transforms PHP source code into opcodes that serve as a form of bytecode, and executes the opcodes directly on the Zend Engine's virtual CPU.

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environment.

References

  1. "php.internals: Changes to Git commit workflow". news-web.php.net. Retrieved 22 April 2021.
  2. "Zend engine". PHP Internals Book. Retrieved 4 October 2021.
  3. "Zend's History with PHP". Zend Technologies.
  4. "PHP: General Information - Manual". php.net. Retrieved 22 November 2019.
  5. Gutmans, Andi (14 July 1999). "- License update · php/php-src@fec59d3" . Retrieved 26 December 2021.
  6. "PHP - What is zend engine?". careerride.