Re: Classes and parents.
| From: | Richard Lynch | Date: | Mon, 24 Jan 2005 19:57:03 +0000 |
| Subject: | Re: Classes and parents. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207151@lists.php.net to get a copy of this message | ||
Dmitry wrote:
> Greetings.
>
> If i run this code (php5):
> ------------------------------------------
> class a {
> function say() { echo "A"; }
> function run() { $this->say(); }
> }
> class b extends a {
//> function say() { echo "B"; }
function say() { parent::say(); echo "B";}
> function run() { parent::run(); }
> }
>
> $obj = new b;
> $obj->run();
> ---------------------------------------
>
> I will get "B", but how i may get "A"?
--
Like Music?
http://l-i-e.com/artists.htm