Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8815 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90212 invoked by uid 1010); 28 Mar 2004 21:35:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90147 invoked from network); 28 Mar 2004 21:35:53 -0000 Received: from unknown (HELO blacksheep.csh.rit.edu) (129.21.60.6) by pb1.pair.com with SMTP; 28 Mar 2004 21:35:53 -0000 Received: from fury.csh.rit.edu (fury.csh.rit.edu [IPv6:2001:470:1f00:135:a00:20ff:fe8d:5399]) by blacksheep.csh.rit.edu (Postfix) with ESMTP id EA61739A for ; Sun, 28 Mar 2004 16:36:05 -0500 (EST) Received: by fury.csh.rit.edu (Postfix, from userid 37404) id A943F144E; Sun, 28 Mar 2004 16:36:05 -0500 (EST) Date: Sun, 28 Mar 2004 16:36:05 -0500 To: internals@lists.php.net Message-ID: <20040328213604.GB13517@csh.rit.edu> Mail-Followup-To: internals@lists.php.net References: <20040328205642.26256.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040328205642.26256.qmail@pb1.pair.com> Subject: Re: [PHP-DEV] reload() in Python, Possible in PHP? From: jon@php.net (Jon Parise) 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/)