Re: note 24313 added to keyword.extends

From: Date: Tue, 13 Aug 2002 01:09:16 +0000
Subject: Re: note 24313 added to keyword.extends
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34906@lists.php.net to get a copy of this message
I think you need to think about what you are doing. The code below is behaving exactly as you are telling it to do. Relax, think about it and you'll see. Your note will be rejected. --- jasonv6@hotmail.com wrote: > 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 ! ! ! ! > -- > http://www.php.net/manual/en/keyword.extends.php > http://master.php.net/manage/user-notes.php?action=edit+24313 > http://master.php.net/manage/user-notes.php?action=delete+24313 > http://master.php.net/manage/user-notes.php?action=reject+24313 > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== --- Jesus M. Castagnetto <jmcastagnetto@php.net> __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com

« previous php.notes (#34906) next »