adding a missing feature in PHP OOP

This commit is contained in:
Florent 2013-07-08 12:41:14 +02:00
parent f698fb6fbb
commit ace46b17f2

View File

@ -1,7 +1,8 @@
--- ---
language: php language: php
contributors: contributors:
- ["Malcolm Fell", "http://emarref.net/"] - [Malcolm Fell](http://emarref.net/)
- [Trismegiste](https://github.com/Trismegiste)
filename: learnphp.php filename: learnphp.php
--- ---
@ -526,6 +527,12 @@ interface InterfaceTwo
public function doSomethingElse(); public function doSomethingElse();
} }
// interfaces can be extended
interface InterfaceThree extends InterfaceTwo
{
public function doAnotherContract();
}
abstract class MyAbstractClass implements InterfaceOne abstract class MyAbstractClass implements InterfaceOne
{ {
public $x = 'doSomething'; public $x = 'doSomething';