Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60752 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81287 invoked from network); 6 Jun 2012 08:12:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2012 08:12:04 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 74.125.83.42 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 74.125.83.42 mail-ee0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:32795] helo=mail-ee0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/21-08677-3D01FCF4 for ; Wed, 06 Jun 2012 04:12:04 -0400 Received: by eekb57 with SMTP id b57so2204117eek.29 for ; Wed, 06 Jun 2012 01:12:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=lUvadB4MnYJS1cDjdPTX/ZjqXKxlLmfdJqVYiCJ5tsY=; b=op46hGybl8uk8EjTefOkVZzh6GZGYeKX8gthNOjyfSUPqySOgieNHeuUpyv5TarolE ujNIxi8J8819Hl0GZgAXUbyrEhh4inQKj4DuWhW/jRpf4s24p72R60NIBfBuB0icDbEN zRDrP7KOpCYLTgvl1CompcCUIqquFk6KejA/x70m/ZEtgoyJRANzAZ19yDVDK6tx8DDk RtiyGH5nyC89GMWSMC7sosPrk7L18Y22pcl591dglsSq9Q3PaBOPPEovqdj1dnuq05Xe qhWfjf5wnmXM/VZE0ENWtLQ7KfwFmhsQQxSg586QAvfxQPZcWenM4+XduUKeRsMuAvxj d/Yg== Received: by 10.14.96.72 with SMTP id q48mr9197180eef.122.1338970320740; Wed, 06 Jun 2012 01:12:00 -0700 (PDT) Received: from [172.18.72.64] ([81.253.9.79]) by mx.google.com with ESMTPS id h53sm3535799eea.1.2012.06.06.01.11.57 (version=SSLv3 cipher=OTHER); Wed, 06 Jun 2012 01:11:58 -0700 (PDT) Message-ID: <4FCF10CD.8060406@lerdorf.com> Date: Wed, 06 Jun 2012 10:11:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Laruence CC: Nikita Popov , PHP internals References: In-Reply-To: X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlsrUtp160isy83qw2BaM5xP58DqaaLtC5ZI46JA2ShlgeWdGaNkEXz/lal7a5sFT+FQEyQ Subject: Re: [PHP-DEV] Generators in PHP From: rasmus@lerdorf.com (Rasmus Lerdorf) On 06/06/2012 04:42 AM, Laruence wrote: > On Wed, Jun 6, 2012 at 10:27 AM, Laruence wrote: >> On Wed, Jun 6, 2012 at 10:15 AM, Laruence wrote: >>> Hi Nikita: >>> >>> the most important part to me is how did you implemented `yield` >>> keyword, is there a whole patch file I can look into? >> Nervermind, I will check the branch out later >> >> thanks > > After a quick look, I think the main idea should goes to two parts: > > 1. implement yield (Zend) > 2. implement spl_generators but not generator class (Spl) yield is interesting. It is one of the main features Facebook added, so it might be worthwhile poking someone there for their implementation details in order to at least be somewhat compatible. -Rasmus