Bug #17900 Updated: Unset() for function and class namespace
| From: | Sky at quit-clan dot de | Date: | Fri, 21 Jun 2002 15:08:54 +0000 |
| Subject: | Bug #17900 Updated: Unset() for function and class namespace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11683@lists.php.net to get a copy of this message | ||
ID: 17900
Updated by: Sky@quit-clan.de
Reported By: Sky@quit-clan.de
-Status: Won't fix
+Status: Open
Bug Type: Feature/Change Request
Operating System: Any
PHP Version: 4.2.1
New Comment:
ok, i got answers like this a thousand times.
i am using php to write a console script. it should be able to
dynamically load "modules" like DLLs under windows. These modules are,
of course, coded in php and contain classes.
the first time when such a module is executed by "eval" all classes in
it are defined in class namespace, everything is fine.
now i want to unload the module - who would i undefine it's class?
even if i didn't use classes - functions can't be undefined, either.
any other suggestions of how to implement a "DLL" like system? the only
solution i can think of was encapsulating a general module in an class,
instanciating it for every module i load, and call it's functions by
the objects interface. but this will disable me from directly calling
methods in my module...
i know this sounds weird, but php is such a flexible language, it
should be able to load functions/objects dynamically!! this would be
great.
Previous Comments:
------------------------------------------------------------------------
[2002-06-21 10:53:57] derick@php.net
uhm? this sounds like a VERY bad idea to me... and very clumsy
programming.
------------------------------------------------------------------------
[2002-06-21 10:51:15] Sky@quit-clan.de
This is another Feature request for special script parsing:
Currently there is the possibility to unset() variables.
But i want the option to clear the function/class namespace, too. A
call like
unfunction('foobar');
sould make a redefine of function foobar() in eval()'d code possible,
for example. Same thing for classes.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17900&edit=1