Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44500 invoked from network); 19 Aug 2012 04:28:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2012 04:28:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.173 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.173 smtp173.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.173] ([67.192.241.173:36198] helo=smtp173.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/36-00850-26B60305 for ; Sun, 19 Aug 2012 00:28:19 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp17.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 3649318818B; Sun, 19 Aug 2012 00:28:16 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp17.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id A78B5188219; Sun, 19 Aug 2012 00:28:14 -0400 (EDT) Message-ID: <50306B5E.7050106@sugarcrm.com> Date: Sat, 18 Aug 2012 21:28:14 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Nikita Popov CC: Sherif Ramadan , Larry Garfield , "internals@lists.php.net" References: <5010138D.5050804@ajf.me> <501015B9.6050704@ajf.me> <501058B9.5050004@lsces.co.uk> <501249B6.5070507@lsces.co.uk> <50128825.4020902@lsces.co.uk> <50231FAD.40104@garfieldtech.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Generators in PHP From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > For PHP we would need to have some similar behavior. PHP's current > exception model is incompatible with GeneratorExitException (because > PHP does not have BaseExceptions). So what I'd probably do instead is > monkeypatch a ZEND_RETURN opcode at the current execution position and Patching opcodes is not a good idea, since opcodes could be cached, and the cache can be shared between different processes. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227