daily pastebin goal
91%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class Planet
  4. {
  5.     static $instances = 0;
  6.     public $instance;
  7.     public $size;
  8.  
  9.     public function __construct()
  10.     {
  11.         $this->instance = ++self::$instances;
  12.         $this->size = 25000;
  13.     }
  14.  
  15.     public function __clone()
  16.     {
  17.         $this->instance = ++self::$instances;
  18.     }
  19.  
  20.     public function getSize()
  21.     {
  22.         return $this->size;
  23.     }
  24. }
  25.  
  26. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top