Re: Can I use Functional Pointer? / Javascript bracelet conflict ?
| From: | Jan Dvorak | Date: | Mon, 15 May 2000 15:21:58 +0000 |
| Subject: | Re: Can I use Functional Pointer? / Javascript bracelet conflict ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62@lists.php.net to get a copy of this message | ||
Hi,
Lin Zhemin wrote:
>
> 1. Can I use Functional Pointer (a pointer that refers to a function) ?
> This would be a basic to polymorphism (since OOP isn't highly
> supported in PHP3). If yes, how can I ?
You can make a call with variable name:
$fname = "do_this_and_that";
$retval = $fname ( $args );
I don't think there will be pointers,
the language has so far been able to avoid them
(which is a good think for a scripting language, IMHO).
And I'm not sure if this variable name
trick works with object method calls.
Anyway, if all else fails, there's eval() :-)
Jan