note 75617 deleted from language.oop5.interfaces by felipe
| From: | felipe@php.net | Date: | Tue, 11 Dec 2007 01:01:09 +0000 |
| Subject: | note 75617 deleted from language.oop5.interfaces by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133345@lists.php.net to get a copy of this message | ||
Note Submitter: florian_mrt at hotmail dot com
----
Classes can adopt interfaces, without the interface-specified functions, if they are inherited from
parent classes.
<?php
interface object_interface
{
public function object_function();
}
abstract class abstract_object
{
public function object_function()
{
print ("This class is: abstract_object");
}
}
class child_object extends abstract_object implements object_interface
{
}
$OB = new child_object;
$OB->object_function();
?>