Re: adding methods to classes

From: Date: Sun, 08 Apr 2001 02:21:08 +0000
Subject: Re: adding methods to classes
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-47610@lists.php.net to get a copy of this message
""Dean Hall"" <hall@apt7.com> wrote in message news:9ao8dc$s6t$1@toye.p.sourceforge.net... > Stupid me. Just extend the class. > > Now the real question: > > Is there any dynamic binding in PHP? You can do simlar thing with Variable Function. For example. class foo { var $function_name; function foo($fname) {$this->function_name = $fname; $this->$function_name;} function a() {echo 'a';} function b() {echo 'b';} } foo('b'); // calls foo::b() >Can I override a method in a subclass? Yes. -- Yasuo Ohgaki > > Dean. > > > > > -- > 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 >

« previous php.general (#47610) next »