Mailinglisten-Archive |
ok... dein code ist nicht so verstaendlich.
class A
{
var $name = 'Hallo Welt';
function doSomething() {}
}
class B extends A
{
function method()
{
echo $this->name;
}
}
$b = new B();
$b->method(); // gibt das attribut aus A aus.
B::method(); // erzeugt fehler, da die attribute
// nur in instanzen vorhanden sind
gruss
thomas
php::bar PHP Wiki - Listenarchive