Guest User

Sinterclass in PHP Class

a guest
Mar 5th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <?php
  2. DEFINE("klaas", "klaas");
  3. class Sinter {
  4.  public $ophef; // Publieke ophef
  5.  public $sint;
  6.  function __construct($klaas) {
  7.   $this->ophef = 0x5a . 0x77 . 0x61 . 0x72 . 0x74 . 0x65; // ophef over Zwarte Piet
  8.   $this->sint = $klaas; // Klaas is de Sint
  9.  }
  10.  public function klaas() {
  11.   return $this->sint; // Return this Sint
  12.  }
  13.  public function piet() {
  14.   $result = "";
  15.   $o = $this->ophef;
  16.   $result = chr($o[0].$o[1]) . chr($o[2].$o[3].$o[4]) . chr($o[5].$o[6]) . chr($o[7].$o[8].$o[9]) . chr($o[10].$o[11].$o[12]) . chr($o[13].$o[14].$o[15]);
  17.   return $result . " " .__FUNCTION__;
  18.  }
  19. }
  20.  
  21. $sint = new Sinter(klaas); // Sint is Sinterklaas
  22. echo get_class($sint).$sint->klaas()." en ".$sint->piet(); // Get klaas, Sint -> Piet
Advertisement
Add Comment
Please, Sign In to add comment