Browse Source

Maintain ZEND_CHANGES to account for the addition of private member variables.

experimental/ZendEngine2
Sebastian Bergmann 25 years ago
parent
commit
6a59c7fcd3
  1. 33
      Zend/ZEND_CHANGES

33
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:
<?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

Loading…
Cancel
Save