会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
﹏Sakura
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
博客园
首页
新随笔
联系
管理
订阅
2012年5月10日
PHP设计模式之单例模式实现
摘要: <?phpclass a { static public $obj; public function __construct(){ } static public function getInstance(){ if(empty(self::$obj)){ echo "执行实例化"; self::$obj = new a(); } return self::$obj; } public function test(){ return "111"; ...
阅读全文
posted @ 2012-05-10 23:31 ﹏Sakura
阅读(352)
评论(4)
推荐(0)
编辑
公告