Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Sinter
- {
- private $sint;
- private $piet;
- private $gezeik = 1412460826651842596;
- private $gezeur = 302404053628330;
- protected $args;
- function __construct($args = null)
- {
- $this->sint = get_class($this) . $args;
- $this->piet = $this->ophef($this->gezeik, 9) . $this->ophef($this->gezeur, 7);
- }
- function ophef($gezeik, $h)
- {
- $output = (string) NULL;
- for ($a = 1; $a <= $h; $a++) {
- $output .= chr(floor($gezeik / pow(120, ($h - $a))));
- $gezeik = ($gezeik % pow(120, ($h - $a)));
- }
- return $output;
- }
- function sint()
- {
- return $this->sint;
- }
- function piet()
- {
- return $this->piet;
- }
- }
- class Piet extends Sinter
- {
- function pieterbaas()
- {
- return $this->piet();
- }
- }
- $klaas = new Sinter("klaas");
- $piet = new Piet();
- echo $klaas->sint() . $piet->pieterbaas();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement