Re: multiple inheritance & problem
| From: | Lars Holm Nielsen | Date: | Mon, 30 Oct 2000 20:46:42 +0000 |
| Subject: | Re: multiple inheritance & problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22721@lists.php.net to get a copy of this message | ||
From the php manual (http://www.dk.php.net/manual/language.oop.php):
Multiple inheritance is not supported.
:)
Subhrajyoti Moitra wrote:
>
> is multiple inheritance supported in php4.0 and later..???
> havent seen much examples though...
>
> Problem...
> i cant run my classes...
> please check the code below...(veh.inc)
>
> class Vehicle {
> // define a few attributes
> var $model;
> var $owner;
> var $color;
> function set_model ($model) {
> $this->model = $model;
> print "<BR>Vehicle set to $this->model.<BR>";
> }
> }//end class vehicle
> now i include this class in another file .. a.php
>
> <?include("veh.inc");
> $auto=new Vehicle;
> ?>
>
> i get the following error...
>
> class Vehicle { var $model; var $owner; var $color; function set_model
> ($model) { $this->model = $model; print "
> Vehicle set to $this->model.
> "; } }//end class vehicle
> Fatal error: Cannot instantiate non-existent class: vehicle in
> d:\tmp\php\test\a.php on line 2
>
> whats wrong...???
>
> my sys. conf. is win2kpro php4.0
>
> --------------------------------------------------------------------------------------
> SECURITY IS A MYTH........!!!!!!!!
> "Linux for people with avg. IQ above 98"
> --------------------------------------------------------------------------------------
> Subhrajyoti Moitra ------- C/212 Hall-I IIT-Kanpur India 208016
> email: subhra@iitk.ac.in
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Regards/Mvh.
Lars Holm Nielsen <lars@hankat.dk>