Re: unload/reload classes?

From: Date: Tue, 19 Mar 2019 10:46:44 +0000
Subject: Re: unload/reload classes?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-104796@lists.php.net to get a copy of this message
On 19.03.2019 at 11:30, Robert Hickman wrote: > On Tue, 19 Mar 2019 at 00:55, Ben Ramsey <ben@benramsey.com> wrote: > >> On Mar 18, 2019, at 18:45, Robert Hickman <robehickman@gmail.com> wrote: >> >> 1: I have seen an extension which allows functions/classes to be >> redefined, although I can't remember what it is called. >> >> Maybe you’re thinking of the runkit extension? >> https://secure.php..net/manual/en/book.runkit.php > > Yes that's what I was thinking of. Looking at it there is > 'runkit_function_redefine' but no > 'runkit_class_redefine', only facility to redefine individual methods > of an existing class. Thus > not matching Rasmus Schultz request. The sandboxing facility of runkit > may make dynamic > reload possible, if a new sandbox were created when reload was > desired. That's just me > reading the API docs though, I haven't tried it. There is runkit_import(), which will overwrite existing class definitions. However, runkit is still not compatible with PHP 7 to my knowledge. Don't know whether runkit7[1] supports it. [1] <https://github.com/TysonAndre/runkit7> -- Christoph M. Becker >

« previous php.internals (#104796) next »