Ben sadece alamadım,
class MyClass
{
const constant = 'constant value';
function showConstant() {
echo self::constant . "\n";
}
}
class MyClass
{
public $constant = 'constant value';
function showConstant() {
echo $this->constant . "\n";
}
}
Nedir temel fark? Onun değişkenler tanımlama gibi sadece aynı, değil mi?