]> granicus.if.org Git - php/commitdiff
Update
authorMarcus Boerger <helly@php.net>
Wed, 11 Feb 2004 22:38:05 +0000 (22:38 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 11 Feb 2004 22:38:05 +0000 (22:38 +0000)
Zend/ZEND_CHANGES

index 579a787a0495f207f9ac39fc495cc9f23b953599..240203386291f1d7d83942f9f892b1e99a92fcef 100644 (file)
@@ -184,6 +184,38 @@ Changes in the Zend Engine 2.0
 
       Old code that has no user-defined classes or functions named 
       'interface' or 'implements' should run without modifications.
+      
+      An interface may extend one or more base interfaces (but not 
+      implement them). Neither a class nor an interface can inherit
+      methods of the same name from different root interfaces.
+
+      Example:
+
+        <?php
+        interface Printable {
+          function dump();
+        }
+        
+        interface Streamable {
+          function writeToStream();
+          static function readFromStream();
+        }
+
+        class PrintableExample implements Printable, Streamable {
+          public function dump() {
+            // ...
+          }
+          function writeToStream() {
+            // ...
+          }
+          static function readFromStream() {
+            // ...
+          }
+        }
+        ?>
+      
+      A class that does not implement all interface methods must be 
+      declared as an abstract class.
 
     * Class Type Hints.