cvs: ZendEngine2 / ZEND_CHANGES
| From: | Sebastian Bergmann | Date: | Thu, 21 Feb 2002 13:10:31 +0000 |
| Subject: | cvs: ZendEngine2 / ZEND_CHANGES | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9418@lists.php.net to get a copy of this message | ||
sebastian Thu Feb 21 08:10:31 2002 EDT
Modified files:
/ZendEngine2 ZEND_CHANGES
Log:
Maintain ZEND_CHANGES to account for the addition of private member variables.
Index: ZendEngine2/ZEND_CHANGES
diff -u ZendEngine2/ZEND_CHANGES:1.17 ZendEngine2/ZEND_CHANGES:1.18
--- ZendEngine2/ZEND_CHANGES:1.17 Mon Jan 14 07:14:18 2002
+++ ZendEngine2/ZEND_CHANGES Thu Feb 21 08:10:31 2002
@@ -28,6 +28,39 @@
gradually migrate to the behavior of the Zend Engine 2 (without
automatic clones).
+ * Private Members.
+
+ The Zend Engine 2.0 introduces private member variables. Note
+ that for performance reasons no error message is emitted in
+ case of an illegal access to a private member variable.
+
+ Example:
+
+ <?php
+ class MyClass {
+ private $Hello = "Hello, World!\n";
+
+ function printHello() {
+ print $this->Hello;
+ }
+ }
+
+ class MyClass2 extends MyClass {
+ function printHello() {
+ MyClass::printHello(); /* Should print */
+ print $this->Hello; /* Shouldn't print out anything */
+ }
+ }
+
+ $obj = new MyClass();
+ print $obj->Hello; /* Shouldn't print out anything */
+ $obj->printHello(); /* Should print */
+
+ $obj = new MyClass2();
+ print $obj->Hello; /* Shouldn't print out anything */
+ $obj->printHello();
+ ?>
+
* Object Cloning
The Zend Engine 1.0 offered no way a user could decide what copy