Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class A{
- protected $choise = "I love apple";
- public function display(){
- print "{$this->choise} <br />\n";
- }
- }
- class B extends A{
- protected $name = "Md. Touhidul Islam Touhid";
- protected $address = "Dianjpur, Bangladesh";
- protected $job = "Programmer";
- public function MyInfo(){
- print $this->name."<br />\n";
- print $this->address."<br />\n";
- print $this->job."<br />\n";
- }
- }
- class C extends B implements MyInterface{
- }
- interface MyInterface{
- public function display();
- public function MyInfo();
- }
- $obj = new C();
- $obj->display();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement