ID: 17900
Comment by: clairaudiant at gmail dot com
Reported By: Sky at quit-clan dot de
Status: Suspended
Bug Type: Feature/Change Request
Operating System: Any
PHP Version: 4.2.1
New Comment:
couldn't you loop through the $classarray and unset each $key => $value
of the array?
foreach ( $class as $key => $value ) {
unset($class[$key])
}
that should fully obliterate reference to the class. i think
Previous Comments:
------------------------------------------------------------------------
[2002-06-21 12:17:57] [email protected]
It's [email protected] , sorry
------------------------------------------------------------------------
[2002-06-21 12:17:29] [email protected]
I think you should bring this up on the [email protected] . 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.
------------------------------------------------------------------------
[2002-06-21 11:08:53] Sky at quit-clan dot 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] [email protected]
uhm? this sounds like a VERY bad idea to me... and very clumsy
programming.
------------------------------------------------------------------------
[2002-06-21 10:51:15] Sky at quit-clan dot 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