Arve

PHP has variable function names:

$myfunc = "this_is_a_func" ;

$foo = $myfunc( ) ;

This way, you can make a single function call access a number of different
functions at run time. You can't change the declaration, but you can change
the call...

You don't really say what you are planning to do, but I would have thought
this approach should meet most requirements. I find it very useful.

Also, as I am sure you know, there are a number of ways of making the number
of parameters dynamic - probably the simplest is to standardise on a single
array as a param, and stick any values you need inside that.

I find that PHP is great for very late binding - there is usually a way if
you look for it...

Geoff Caplan
Advantae Ltd

> As a small, personal, "enjoy-myself"-project I'd like to run a
> perpetual-running socket server. Problem is; I also want it to be
> self-modifying so I can insert, remove and change functions as the
> server is running.
>
> The problem is; under normal circumstances, PHP won't let the script
> redeclare functions. Is there any way to circumvent this.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to