【发布时间】:2013-11-25 18:18:53
【问题描述】:
我正在看一本php的书,发现了这段代码:
class Employee {
static public $NextID = 1;
public $ID;
public function _ _construct( ) {
$this->ID = self::$NextID++;
}
public function NextID( ) {
return self::$NextID;
}
}
这里为什么用self::$NextID++;可以这样用吗:
$this-ID = $this->$NextID++;
【问题讨论】:
标签: php