2016年2月3日

静态变量和静态方法的生命周期

摘要: 先看一段代码: 1<?php 2 class User 3 { 4 static private $counter = 1; 5 6 public function __construct() 7 { 8 self::$counter++; 9 }1011 static public functio 阅读全文

posted @ 2016-02-03 09:53 暴走php 阅读(787) 评论(0) 推荐(0) 编辑

导航