Stop思念3年前
三私一公
class Animal{
protected static $instance = null;
final protected function __construct()
{
}
protected function __clone(){
}
public static function getInstance(){
if(self::$instance ==null){
self::$instance = new self();
}
return self::$instance;
}
}
0