Re: reload() in Python, Possible in PHP?

From: Date: Sun, 28 Mar 2004 21:36:05 +0000
Subject: Re: reload() in Python, Possible in PHP?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-8815@lists.php.net to get a copy of this message
On Sun, Mar 28, 2004 at 03:57:22PM -0500, Andrew Heebner wrote: > AFAIK, Python supports the reload() method, which lets you dynamically > control includes while a script is running. This is conceptually easier to implement in Python because a module is its own namespace. In PHP, the "stuff" that is included from another file has no such common organization. > In PHP, even workarounds are tough to create reloadable modules for > scripts, so, what other means are there to reload includes, and > redeclare functions? If it's not already safe to include() your file multiple times, I don't think adding a reload() function to PHP is going to improve your situation all that much. The engine would have to do a fair amount of work to figure out how to "reload" the contents of the external script. -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.internals (#8815) next »