The Wayback Machine - https://web.archive.org/web/20060719204721/http://www.zend.com:80/zend/zend-engine-summary.php
Zend - The php Company   Welcome   Register  |   Log in  |   My Zend  |  
 

PHP 5
What's New
Migration
Forum
Core Basics
In Depth
Zend Engine II
Guru Q & A
PHP General
PEAR and PECL
Forums
Resources
Documentation
Code/App Gallery
Community
Code News
Downloads
Partners
Zend Engine version 2.0: Feature Overview and Design

Overview

Version 1.0 of the Zend Engine is the heart and brain of PHP 4.0. It provides the infrastructure and services to the function modules, and implements the language syntax. The Zend Engine 1.0 is actually the second revision of the PHP scripting engine; it�s still largely based on the same parsing rules as the PHP 3.0 engine (which was basically �Zend Engine 0.5�). While this allowed for a very easy migration path from PHP 3.0 to 4.0, it also limited the scope of language-level improvements, to the PHP 3.0 �state of mind.� Thanks to the unprecedented success of PHP 3.0 and 4.0, we received a lot of feedback from developers, regarding the kinds of language features that they were either missing, or wanted to see improved. We feel that the time is right to start working toward a revision of the Zend Engine that will incorporate new features, improve existing ones, and provide solutions to some of the most difficult problems that PHP developers experience today.
The scope of the Zend Engine 2.0 is such that it can be implemented in a reasonable time frame of several months. Future versions of the Zend Engine may -- and probably will -- include additional features.
This design is not yet final, and may change before the final version of the Zend Engine 2.0. Discussions about the Zend Engine 2.0 will take place on the Engine 2.0 mailing list (mail engine2-subscribe@lists.zend.com to subscribe).

Key Features

Revamped Object Model

PHP 3.0 introduced the concept of objects as native language values, very similar to PHP�s arrays. The Zend Engine 1.0 (in PHP 4.0) implemented the same semantics, and improved other language features to allow easier manipulation of objects, such as pass-by-reference and return-by-reference features.
However, the way PHP handles its native values wasn�t completely suitable for handling objects. For example, most people expected that objects always be passed and returned by reference, unless explicitly asked to do otherwise. Another limitation was the inability to introduce destructor methods. The Zend Engine 2.0 introduces a new object model, more similar to Java, in the sense that variables now contain object handles, instead of the objects themselves. This means that moving around the object handle back and forth will no longer create replicas of the object, but just multiple references to the same object. In addition to a much more intuitive programming interface, the new object model allows for the implementation of destructors, improved dereferencing support (func()->method1()->method2()), and more.
Other major improvements to the OO API being considered for the Zend Engine 2.0 include:

  • Multiple Inheritance *
  • Private Member Variables *
  • Static Member Variables

    Exception Handling

    The Zend Engine 2.0 will feature try, catch and throw statements, which will significantly improve the ability to develop fault-tolerant applications easily. In addition to user-level throwing of exceptions, users will also be able to configure the engine so that internal functions raise exceptions instead of returning error codes; this will simplify error recovery in various situations (e.g., recovering from any type of error when connecting, selecting and querying a database).

    Improved Interface with 3rd party OO APIs

    The ability to interface with 3rd party OO APIs, such as Java objects, COM components, will be significantly improved, to allow for much tighter integration of PHP with other object models. Made possible by the new object model of the Zend Engine 2.0, full integration with Java will be closer than ever before.

    Internationalization

    In the Zend Engine 2.0, there will be an attempt to improve support for non-Western character sets and UNICODE. In addition, it will support multilingual error messages.


    * These features are not yet final. Whether or not they'll be a part of the Zend Engine 2.0 will be publicly discussed.

  •  

    of online users and of online guests are currently viewing this page.
    Contact Us  |  Terms and Conditions  |  Privacy Policy  |  Newsletter  |  Site Map
    Copyright © 1999 - 2006 by Zend Technologies Ltd. All rights reserved.  
    PHP 5 Zend Platform