Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60762 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24198 invoked from network); 6 Jun 2012 17:09:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2012 17:09:19 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:50803] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/11-17461-DBE8FCF4 for ; Wed, 06 Jun 2012 13:09:18 -0400 Received: by lagy4 with SMTP id y4so5351604lag.29 for ; Wed, 06 Jun 2012 10:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=aivVJtKBIOoPxCVnVwPmBogVD9jQmFhXfSOwsvegurw=; b=KiLTktz4XLYpiSAt/KANrjyZSefyN6MdDVglVIoaE3MRe8VtE9zrw78/SEVpx9atFv ThKz1SJ8mbtvUpnCxbvPTekrQt/SlSubBPVxkfsrEy2zkKYG1EnDUpcl8J1xmxZS0mnC 9yGecJpSBzvfj/3zLa+LJlcAgTtgEPvQZLY0/IItP1V4Sur4ifrZ4zbW7NmsZlJxBrtO ZuYm79iz6kdQScMEJeb9IfRtl3K7T80e+UhtcxWFdQtR2NMJkJHOYiRvoKwNM8XiaNzo /VmcT0ZAp6CJ5z6tbOqlaHys/coP1pMuOOvdo6Syf+cQgV7QnKESF3hxrUIAx0v9sYBx xzhQ== MIME-Version: 1.0 Received: by 10.152.105.173 with SMTP id gn13mr22364691lab.20.1339002554360; Wed, 06 Jun 2012 10:09:14 -0700 (PDT) Received: by 10.152.114.70 with HTTP; Wed, 6 Jun 2012 10:09:14 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 Jun 2012 19:09:14 +0200 Message-ID: To: Kris Craig Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Generators in PHP From: nikita.ppv@googlemail.com (Nikita Popov) On Tue, Jun 5, 2012 at 8:32 PM, Kris Craig wrote: > Some observations and questions: > > In the RFC, the top example claims to make use of the file() function, bu= t > in fact does not. =A0Did you mean fopen()? =A0Or did you mean that this t= o be an > example of someone writing their own file() function in PHP for some reas= on > (the "userland" reference is a bit confusing IMHO given the context). It's an implementation of the file() function in userland code (as opposed to the internal file() implementation). file() returns all lines from a file as an array. > In what way(s) do you believe this approach would differ from inline > functions and what advantage(s) do you see in those differences? I'm not sure what you mean by inline functions. PHP doesn't do function inlining (and it doesn't seem related to this). Or do you mean closures? Again, I'm not sure how closures are related to this. > What release version do you believe should be targetted for this? The next major version, i.e. PHP 5.5. Nikita