class?studeng
{
????public?static?$a?=?0;
????public??function?bb()
????{
????????self::$a;
????????return?self::$a++;
????????
????}
}
//$studeng?=?new?studeng();
//echo?$studeng->bb();
echo?studeng::bb()."<br>";
echo?studeng::bb()."<br>";
echo?studeng::bb()."<br>";
明明沒(méi)加static,為什么方法也可以使用“::”?
錯(cuò)過(guò)了年華
2017-03-07 22:29:56