Guest User

Untitled

a guest
Dec 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. class Students
  2. {
  3.  
  4. public $name;
  5. public $age;
  6. public $color;
  7. public $id;
  8.  
  9. public function studentsList($name,$age,$color,$id){
  10. echo $this->name = $name . '<br>';
  11. echo $this->age = $age . '<br>';
  12. echo $this->color = $color . '<br>';
  13. echo $this->id = $id . '<br>';
  14. echo '<hr>';
  15. }
  16. }
  17.  
  18. $Gostudent = new Students();
  19. print_r($Gostudent->studentsList('wael','36','white',13));
  20.  
  21.  
  22. class Sony extends Students
  23. {
  24. public $camera = '25 MB';
  25.  
  26. }
  27.  
  28. $SonyNew = new Sony();
  29. print_r($SonyNew->studentsList('wael','36','white',13));
Add Comment
Please, Sign In to add comment