Edit report at https://bugs.php.net/bug.php?id=17900&edit=1
ID: 17900
Updated by: [email protected]
Reported by: Sky at quit-clan dot de
Summary: Unset() for function and class namespace
-Status: Suspended
+Status: Closed
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Any
PHP Version: 4.2.1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The runkit extension[1] provides respective features, so I'm
closing this request.
[1] <http://php.net/manual/en/book.runkit.php>
Previous Comments:
------------------------------------------------------------------------
[2009-07-19 19:01:49] clairaudiant at gmail dot com
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
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=17900
--
Edit this bug report at https://bugs.php.net/bug.php?id=17900&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.