Guest User

Untitled

a guest
May 20th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. class MyObject {
  2.     static private $instance;
  3.     static public function Singleton() {
  4.         if (empty(self::$instance)) {
  5.             self::$instance = new MyObject;
  6.         }
  7.         return self::$instance;
  8.     }
  9.  
  10.     /* The rest of your class */
  11. }
Add Comment
Please, Sign In to add comment