可能重複:
PHP: self vs this和 When to use self over $thisPHP:這和自我
什麼區別$this
self::
例如之間:
class Object{
public $property;
function doSomething(){
// This
$something = $this->property;
// Self
$something = self::property;
...code...
}
}
確切的重複數據刪除:http://stackoverflow.com/questions/151969/php-self-vs-this – Trufa 2010-12-05 22:26:02