Was ist der Unterschied zwischen self :: $ bar und static :: $ bar in PHP? [Duplikat]
Mögliche Duplikate:
Neues Selbst gegen neue Statik
Was ist der Unterschied zwischen der Verwendung vonself
undstatic
Im Beispiel unten?
class Foo
{
protected static $bar = 1234;
public static function instance()
{
echo self::$bar;
echo "\n";
echo static::$bar;
}
}
Foo::instance();
produziert1234
1234