Date: 09/20/00
- Next message: Jurii: "Re: [PHP] Best texteditor to use for PHP coding?"
- Previous message: Jiri Vyslouzil: "[PHP] PHP version"
- In reply to: Tristan Rybak: "[PHP] Interface problem..."
- Next in thread: Teodor Cimpoesu: "Re: [PHP] R: [PHP] Interface problem..."
- Reply: Teodor Cimpoesu: "Re: [PHP] R: [PHP] Interface problem..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Tristan Rybak" <tristan.rybak <email protected>> wrote in message
NEBBKHDGHKNKKBHPLAFJEELKCBAA.tristan.rybak <email protected>
> Hello gurus...
> I am going to create a system (in php) of loadable modules similar to
> Win32/COM. I am working on interface system and I want to use a "Variable
> functions" feature for it. Unfortunately it doesn't work for class
methods.
> Here is a code:
>
> <?php
> class Test {
> var $varFunc = "func1";
>
> function func1() {
> echo "exec: func1";
> }
> }
>
> $t = new Test;
>
> $t->varFunc();
> ?>
>
The following statement should work with your example.
eval("\$t->" . $t->varFunc ."();");
Bye
Darvin
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jurii: "Re: [PHP] Best texteditor to use for PHP coding?"
- Previous message: Jiri Vyslouzil: "[PHP] PHP version"
- In reply to: Tristan Rybak: "[PHP] Interface problem..."
- Next in thread: Teodor Cimpoesu: "Re: [PHP] R: [PHP] Interface problem..."
- Reply: Teodor Cimpoesu: "Re: [PHP] R: [PHP] Interface problem..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

