summaryrefslogtreecommitdiff
path: root/Zend/ZEND_CHANGES
diff options
context:
space:
mode:
authorSebastian Bergmann <sebastian@php.net>2002-12-07 16:47:44 +0000
committerSebastian Bergmann <sebastian@php.net>2002-12-07 16:47:44 +0000
commit81b1ed9ff3d27d8b3081d4cc4ec229a0d8ea3fd1 (patch)
treec899ab70dd689cd08d705fea54d318234381cbe4 /Zend/ZEND_CHANGES
parent66e40c013d3a0ea731c19543a762f7849d62e414 (diff)
downloadphp-git-81b1ed9ff3d27d8b3081d4cc4ec229a0d8ea3fd1.tar.gz
Update.
Diffstat (limited to 'Zend/ZEND_CHANGES')
-rw-r--r--Zend/ZEND_CHANGES74
1 files changed, 24 insertions, 50 deletions
diff --git a/Zend/ZEND_CHANGES b/Zend/ZEND_CHANGES
index 2ded4b52ad..265be180a1 100644
--- a/Zend/ZEND_CHANGES
+++ b/Zend/ZEND_CHANGES
@@ -21,9 +21,10 @@ Changes in the Zend Engine 2.0
* Private and Protected Members.
- The Zend Engine 2.0 introduces private and protected member variables.
- Note that for performance reasons no error message is emitted in
- case of an illegal access to a private or protectecd member variable.
+ The Zend Engine 2.0 introduces private and protected member
+ variables. Note that for performance reasons no error message is
+ emitted in case of an illegal access to a private or protectecd
+ member variable.
Example:
@@ -34,9 +35,9 @@ Changes in the Zend Engine 2.0
protected $Foo = "Hello, Bar!\n";
function printHello() {
- print "MyClass::printHello() ".$this->Hello;
- print "MyClass::printHello() ".$this->Bar;
- print "MyClass::printHello() ".$this->Foo;
+ print "MyClass::printHello() " . $this->Hello;
+ print "MyClass::printHello() " . $this->Bar;
+ print "MyClass::printHello() " . $this->Foo;
}
}
@@ -44,10 +45,10 @@ Changes in the Zend Engine 2.0
protected $Foo;
function printHello() {
- MyClass::printHello(); /* Should print */
- print "MyClass2::printHello() ".$this->Hello; /* Shouldn't print out anything */
- print "MyClass2::printHello() ".$this->Bar; /* Shouldn't print (not declared)*/
- print "MyClass2::printHello() ".$this->Foo; /* Should print */
+ MyClass::printHello(); /* Should print */
+ print "MyClass2::printHello() " . $this->Hello; /* Shouldn't print out anything */
+ print "MyClass2::printHello() " . $this->Bar; /* Shouldn't print (not declared)*/
+ print "MyClass2::printHello() " . $this->Foo; /* Should print */
}
}
@@ -64,13 +65,15 @@ Changes in the Zend Engine 2.0
$obj->printHello();
?>
- Protected member variables can be accessed in classes extending the class
- they are declared in, whereas private member variables can only be accessed
- by the class they belong to.
-
- Note: Protected member variables have to be declared in every class they
- are used!
+ Protected member variables can be accessed in classes extending the
+ class they are declared in, whereas private member variables can
+ only be accessed by the class they belong to.
+
+ Note: Protected member variables have to be declared in every class
+ they are used!
+ * Private and protected methods. (TBD)
+
* Object Cloning.
The Zend Engine 1.0 offered no way a user could decide what copy
@@ -489,12 +492,13 @@ Changes in the Zend Engine 2.0
print foo::$my_static;
?>
- * Static methods (TBD)
+ * Static methods. (TBD)
- * Abstract methods (TBD)
+ * Abstract methods. (TBD)
- * static function variables
- statics are now treated at compile-time which allows developers
+ * Static function variables.
+
+ Statics are now treated at compile-time which allows developers
to assign variables to statics by reference. This change also
greatly improves their performance but means that indirect
references to statics will not work anymore.
@@ -512,36 +516,6 @@ Changes in the Zend Engine 2.0
}
?>
- * Built-In Backtracing.
-
- Example:
-
- <?php
- $backtrace = debug_backtrace();
-
- foreach ($backtrace as $step) {
- if (!empty($step['args'])) {
- foreach ($step['args'] as $arg) {
- $args = isset($args) ? $args . ', ' : '';
- $args .= var_export($arg, true);
- }
- } else {
- $args = '';
- }
-
- $args = str_replace(array("\n", ',)'), array('', ')'), $args);
-
- printf(
- "%s%s(%s) [%s:%s]\n",
- isset($step['class']) ? $step['class'] . '::' : '',
- $step['function'],
- $args,
- $step['file'],
- $step['line']
- );
- }
- ?>
-
* __autoload(). TBD.
* Method calls and property accesses can be overloaded