cvs: ZendEngine2 / ZEND_CHANGES

From: Date: Sun, 29 Jun 2003 09:40:23 +0000
Subject: cvs: ZendEngine2 / ZEND_CHANGES
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1403@lists.php.net to get a copy of this message
sebastian Sun Jun 29 05:40:23 2003 EDT Modified files: /ZendEngine2 ZEND_CHANGES Log: Remove namespace references. Index: ZendEngine2/ZEND_CHANGES diff -u ZendEngine2/ZEND_CHANGES:1.56 ZendEngine2/ZEND_CHANGES:1.57 --- ZendEngine2/ZEND_CHANGES:1.56 Thu Apr 10 12:54:46 2003 +++ ZendEngine2/ZEND_CHANGES Sun Jun 29 05:40:23 2003 @@ -293,54 +293,6 @@ print $obj->address . "\n"; ?> - * Namespaces. - - The Zend Engine 1.0 provided only three scopes: the global - scope, the class scope and the function scope. All scopes but - classes could contain variables, only the class and global - scopes could contain functions, while only the global scope - could contain constants and classes. This means that all of the - Zend Engine 1.0's scoping methods were inherently limited for - solving symbol name collision problems. - - The Zend Engine 2.0 introduces the concept of namespaces - to solve the symbol collision problem by making it possible to - define multiple symbol tables able to contain all types of - symbols. - - A namespace may contain classes, constants, functions and variables. - The member of a namespace is accessed by prefixing its name with the - name of the namespace followed by '::'. - - Example: - - <?php - namespace Foo { - class Bar {} - const aConstant = 'someValue'; - function aFunction() {} - var $aVariable; - } - - $o = new Foo::Bar; - echo Foo::aConstant; - Foo::aFunction(); - Foo::$aVariable = 'someValue'; - ?> - - A namespace's name may contain colons to denote "sub-namespaces". - This is pure syntactic sugar, the Zend Engine will not see, for - instance, the namespaces "Package", "Package:Subpackage" and - "Package:Subpackage:Subsubpackage" as related. - - Namespaces can be neither nested nor instantiated. - - To avoid ambiguities in the '::' resolution there may be no - global class and namespace with the same name. - - Old code that has no user-defined classes or functions named - 'namespace' should run without modifications. - * Unified Constructors. The Zend Engine allows developers to declare constructor methods @@ -428,8 +380,7 @@ * Constants. - The Zend Engine 2.0 introduces per-class and per-namespace - constants. + The Zend Engine 2.0 introduces per-class constants. Example:

« previous php.zend-engine.cvs (#1403) next »