Zend Engine

{{Short description|PHP scripting engine}}

{{Distinguish|text=Laminas formerly known as Zend Framework}}

{{primary sources|date=July 2016}}

{{Use dmy dates|date=August 2021}}

{{Infobox software

| name = Zend Engine

| title = Zend Engine

| logo = Zend_Engine_logo.png

| screenshot =

| caption =

| collapsible =

| author = Andi Gutmans, Zeev Suraski

| developer = Zend Technologies, The PHP Development Team

| released = 1999

| discontinued =

| latest release version = 3.4 (PHP 7.4)
4.0 (PHP 8.0)

| latest release date =

| latest preview version =

| latest preview date = {{Start date and age|2015|11|12|df=yes}}

| programming language = C

| operating system =

| platform =

| size =

| language =

| genre = Scripting engine

| license = Zend Engine License (some parts are under the PHP License)

| repo = {{URL|https://github.com/php/php-src}}{{Cite web|title=php.internals: Changes to Git commit workflow|url=https://news-web.php.net/php.internals/113838|access-date=2021-04-22|website=news-web.php.net}}

| website = {{URL|https://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.{{cite web |url=http://www.phpinternalsbook.com/php7/zend_engine.html |title=Zend engine |website=PHP Internals Book |access-date=2021-10-04 }} 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.

The first version of the Zend Engine appeared in 1999 in PHP version 4.{{cite web|url=http://www.zend.com/en/community/php/|title=Zend's History with PHP|publisher=Zend Technologies}} 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.{{Cite web|url=https://www.php.net/manual/en/faq.general.php#faq.general.relation-versions|title=PHP: General Information - Manual|website=php.net|access-date=2019-11-22}}

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,{{Cite web|title=- License update · php/php-src@fec59d3|url=https://github.com/php/php-src/commit/fec59d3b4da7fdc111dd0af19a4b0488dc817fc7|access-date=2021-12-26|language=en|date=1999-07-14|first=Andi|last=Gutmans}} 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.{{cite web|url=http://www.careerride.com/PHP-zend-engine.aspx|title=PHP - What is zend engine?|publisher=careerride}}

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

  • {{Portal inline|Free and open-source software}}

References

{{reflist}}