Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Planet
- {
- static $instances = 0;
- public $instance;
- public $size;
- public function __construct()
- {
- $this->instance = ++self::$instances;
- $this->size = 25000;
- }
- public function __clone()
- {
- $this->instance = ++self::$instances;
- }
- public function getSize()
- {
- return $this->size;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment