Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14752 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78396 invoked by uid 1010); 9 Feb 2005 16:03:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78341 invoked from network); 9 Feb 2005 16:03:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2005 16:03:52 -0000 X-Host-Fingerprint: 66.80.117.3 longsword.omniti.com Linux 2.4/2.6 Received: from ([66.80.117.3:43514] helo=mail.omniti.com) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id C1/69-24923-4443A024 for ; Wed, 09 Feb 2005 11:03:16 -0500 DomainKey-Status: good DomainKey-Signature: q=dns; a=rsa-sha1; c=nofws; s=test; d=omniti.com; h=Received:In-Reply-To:References:Mime-Version:Content-Type:Message-Id:Content-Transfer-Encoding:Cc:From:Subject:Date:To:X-Mailer; b=JC5EXCSJB4RBA+h4cIVaj7jqTY77+4WkL7N46LzN4B5QLyKwPF/gXm07tACZgqgU ZbYdRuEwATNz4RqkpuF9e0vmNQkxDGwoohxOSk8w/t28KiGj4Wwh211dHxEXNHN3 Received: from ([66.80.117.2:55168] helo=[10.80.116.150]) by mail.omniti.com (ecelerity HEAD) with SMTP id 8A/F6-22836-5343A024 for ; Wed, 09 Feb 2005 11:03:04 -0500 In-Reply-To: <20050209155704.61669.qmail@lists.php.net> References: <20050209055745.928.qmail@web50206.mail.yahoo.com> <20050209155704.61669.qmail@lists.php.net> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: George Schlossnagle , internals@lists.php.net Date: Wed, 9 Feb 2005 11:01:22 -0500 To: "Sara Golemon" X-Mailer: Apple Mail (2.619.2) Subject: Re: [PHP-DEV] Re: intercepting function calls From: george@omniti.com (George Schlossnagle) On Feb 9, 2005, at 10:57 AM, Sara Golemon wrote: >> Is it possible to intercept a function call (user >> space or built-in) in the Zend Engine and execute user >> space code before/after the function call? >> > Yes, you can do this by way of a Zend extension (not a PHP extension > mind > you). > > The parts of Zend/zend_extensions.h you'll want to pay attention to > are: You can also do this by directly wrapping zend_execute. This is the preferred method if you're writing a profiler or such. George