From: Sebastian Bergmann Date: Thu, 21 Feb 2002 13:10:31 +0000 (+0000) Subject: Maintain ZEND_CHANGES to account for the addition of private member variables. X-Git-Tag: php-4.2.0RC1~301 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a59c7fcd31d832edf12d71afe19964586148148;p=php Maintain ZEND_CHANGES to account for the addition of private member variables. --- diff --git a/Zend/ZEND_CHANGES b/Zend/ZEND_CHANGES index f17f4e3003..80f0604eb3 100644 --- a/Zend/ZEND_CHANGES +++ b/Zend/ZEND_CHANGES @@ -28,6 +28,39 @@ Changes in the Zend Engine 2.0 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: + + 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