Bug #17900 Updated: Unset() for function and class namespace

From: Date: Fri, 21 Jun 2002 16:17:29 +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-11695@lists.php.net to get a copy of this message
ID: 17900 Updated by: mfischer@php.net Reported By: Sky@quit-clan.de -Status: Open +Status: Suspended Bug Type: Feature/Change Request Operating System: Any PHP Version: 4.2.1 New Comment: I think you should bring this up on the engine2@lists.php.net . In the past I had also the same reasons for it (dynamic remote code updating with PHP-GTK, etc.) but this won't be implemented just because of a few feature requests. I think the main problem is that "making it work" far exceeds the benefits over the time it takes to implement so we'll just have to forget it (imho). Suspending. Previous Comments: ------------------------------------------------------------------------ [2002-06-21 11:08:53] Sky@quit-clan.de 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. ------------------------------------------------------------------------ [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

« previous php.bugs (#11695) next »