Re: Interface problem...

From: Date: Mon, 18 Sep 2000 17:11:10 +0000
Subject: Re: Interface problem...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17158@lists.php.net to get a copy of this message
On Mon, 18 Sep 2000, Tristan Rybak wrote: > <?php > class Test { > var $varFunc = "func1"; > > function func1() { > echo "exec: func1"; > } > } > > $t = new Test; > > $t->varFunc(); > ?> > > it causes: > Fatal error: Call to unsupported or undefined function varfunc() in > /storage/home/trybak/public_html/index.php on line 13 > Okay, I don't have much experience with classes, but this might work: $t = new Test; $variable = $t->varFunc . "()"; $t->$$variable; Again, I have no idea if this is going to work or not, but oh well. Joao -- Joao Prado Maia Web Developer Kefta, Inc. T: (415) 391-6881 ext 8008 F: (415) 391-7079 Marketers: Check out http://www.kefta.com for your next risk free acquisition campaign! Sign up for a Keftamail account today: the free email that pays! http://www.keftamail.com/www/reg.php

« previous php.general (#17158) next »