Re: extending a class

From: Date: Thu, 10 Apr 2003 18:41:03 +0000
Subject: Re: extending a class
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-143380@lists.php.net to get a copy of this message
On Thu, 2003-04-10 at 13:24, Dennis Gearon wrote: > Nope > ------------------------------------------- > ?php > class base{ > var $var=0; > } > $base_class = 'base'; > class new_class extends $$base_class{ > var $new_var = 1; > } > gave error: > - - - - - - - - > Parse error: parse error, unexpected '$', expecting T_STRING in > test_variable_base_class.php on line 6 > so what's wrong with using class new_class extends base ? -- Burhan Khalid phplist[at]meidomus[dot]com Please add a reply-to: header in your messages that points to the mailing list address so that all mail is properly archived and viewed.

« previous php.general (#143380) next »