What you have described is essentially the singleton pattern. Please see this questionsee this question for good reasons why you might not want to do this.
If you really want to do it, you could implement something like this:
class a { public static $instance; public function __construct() { self::$instance = $this; } public static function get() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; } } $a = a::get();