Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20038 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95808 invoked by uid 1010); 16 Nov 2005 00:07:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95792 invoked from network); 16 Nov 2005 00:07:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2005 00:07:50 -0000 X-Host-Fingerprint: 64.233.184.206 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.206:34215] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 57/A8-07637-4587A734 for ; Tue, 15 Nov 2005 19:07:49 -0500 Received: by wproxy.gmail.com with SMTP id i24so1354829wra for ; Tue, 15 Nov 2005 16:07:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lf6HXIWwgi91GpJ5GqNmzQhLP3vMRy7m9l/gIz6zItBYjhs9ugXYta0pwUFPsZ7qR4G3R2/LFWRKGVQ35k+tdWQIxkWDKFqnbnCigUD6afHa+8xAo0/IQvgdzgkZtKx75alIXjv408/apy932PMnnVTdgrtVIVKCXWiSKG2J4e0= Received: by 10.54.101.18 with SMTP id y18mr5406675wrb; Tue, 15 Nov 2005 16:07:45 -0800 (PST) Received: by 10.54.76.6 with HTTP; Tue, 15 Nov 2005 16:07:44 -0800 (PST) Message-ID: <4e89b4260511151607l3130babes3bff25f450a3cf2e@mail.gmail.com> Date: Tue, 15 Nov 2005 19:07:44 -0500 To: acox@broadwick.com Cc: internals@lists.php.net In-Reply-To: <1132089414.7822.14.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1132089414.7822.14.camel@localhost.localdomain> Subject: Re: [PHP-DEV] Overriding Default Functions From: kingwez@gmail.com (Wez Furlong) I think runkit is what you're looking for. http://pecl.php.net/packages/runkit --Wez. On 11/15/05, Alan Cox wrote: > Hello - > Is there a way to build an extension that overrides the default > behavior of a built-in PHP function? Would it be possible to add an > extension that removes a PHP function, so that I could redefine it in my > PHP code? > > What I want to do is override the time calculations. We are running > unit tests on a testing server that are dependent on time. For > instance, there is one behavior before the 15th of the month and another > one on or after the 15th. I'm not able to change the system time, since > this testing server is used by a lot of people. What I'd like to be > able to do is load a module in the unit test that makes it so that a > custom time() function is used. This time() function wouldn't look at > the system clock for the time. > > Thanks for your help. > Alan > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >