note 24313 rejected from keyword.extends by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Tue, 13 Aug 2002 01:09:26 +0000 |
| Subject: | note 24313 rejected from keyword.extends by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34907@lists.php.net to get a copy of this message | ||
Hi, i have a problem with a simple code. I extend a class A with a class B. In the class B, i have
access to the class A functions in the class B but not the variables ! Here is a simple code that
works the same as my code :
class A {
var $Avar;
function A () {
$Avar = "A var";
}
}
class B extends A {
function B () {
echo "$this->$Avar";
}
}
$aclass = new A ();
$bclass = new B ();
it echoes nothing ! ! ! !