cvs: ZendEngine2 / ZEND_CHANGES

From: Date: Thu, 10 Apr 2003 16:54:46 +0000
Subject: cvs: ZendEngine2 / ZEND_CHANGES
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1133@lists.php.net to get a copy of this message
sebastian Thu Apr 10 12:54:46 2003 EDT Modified files: /ZendEngine2 ZEND_CHANGES Log: Document 'const' keyword. Index: ZendEngine2/ZEND_CHANGES diff -u ZendEngine2/ZEND_CHANGES:1.55 ZendEngine2/ZEND_CHANGES:1.56 --- ZendEngine2/ZEND_CHANGES:1.55 Fri Mar 7 11:45:41 2003 +++ ZendEngine2/ZEND_CHANGES Thu Apr 10 12:54:46 2003 @@ -426,6 +426,34 @@ one would have to explicitly call parent::__destruct() in the destructor body. + * Constants. + + The Zend Engine 2.0 introduces per-class and per-namespace + constants. + + Example: + + <?php + class Foo { + const constant = 'constant'; + } + + echo 'Foo::constant = ' . Foo::constant . "\n"; + ?> + + The Zend Engine 2.0 allows for expressions within constants: + + <?php + class Bar { + const a = 1<<0; + const b = 1<<1; + const c = a | b; + } + ?> + + Old code that has no user-defined classes or functions + named 'const' will run without modifications. + * Exceptions. The Zend Engine 1.0 had no exception handling. The Zend Engine 2.0 @@ -464,8 +492,8 @@ } ?> - Old code that has no user-defined functions 'catch', 'throw' and - 'try' will run without modifications. + Old code that has no user-defined classes or functions 'catch', + 'throw' and 'try' will run without modifications. * Dereferencing objects returned from functions.

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