Advertisement
Guest User

Sinter class

a guest
Sep 8th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2. class Sinter
  3. {
  4.     private $sint;
  5.     private $piet;
  6.     private $ophef = [32, 101, 110, 32, 90, 119, 97, 114, 116, 101, 32, 112, 105, 101, 116, 10];
  7.  
  8.     function __construct()
  9.     {
  10.         $this->sint = get_class($this) . "klaas";
  11.         $this->piet = $this->ophef();
  12.     }
  13.  
  14.     function ophef()
  15.     {
  16.         $output = "";
  17.         foreach ($this->ophef as $gelazer)
  18.         {
  19.             $output .= chr($gelazer);
  20.         }
  21.         return $output;
  22.     }
  23.  
  24.     function sint()
  25.     {
  26.         return $this->sint;
  27.     }
  28.  
  29.     function piet()
  30.     {
  31.         return $this->piet;
  32.     }
  33. }
  34.  
  35. class Piet extends Sinter
  36. {
  37.     function pieterbaas()
  38.     {
  39.         return $this->piet();
  40.     }
  41. }
  42.  
  43. $klaas = new Sinter("klaas");
  44. $piet = new Piet();
  45.  
  46. echo $klaas->sint() . $piet->pieterbaas();
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement