Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62581 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42941 invoked from network); 29 Aug 2012 16:26:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Aug 2012 16:26:21 -0000 Authentication-Results: pb1.pair.com header.from=jared.williams1@ntlworld.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jared.williams1@ntlworld.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ntlworld.com designates 81.103.221.56 as permitted sender) X-PHP-List-Original-Sender: jared.williams1@ntlworld.com X-Host-Fingerprint: 81.103.221.56 queueout02-winn.ispmail.ntl.com Solaris 10 (beta) Received: from [81.103.221.56] ([81.103.221.56:39917] helo=queueout02-winn.ispmail.ntl.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/C0-37500-AA24E305 for ; Wed, 29 Aug 2012 12:26:19 -0400 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout04-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20120829162147.DIOC18581.mtaout04-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Wed, 29 Aug 2012 17:21:47 +0100 Received: from p2 ([82.3.17.226]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20120829162147.QQCM24459.aamtaout04-winn.ispmail.ntl.com@p2>; Wed, 29 Aug 2012 17:21:47 +0100 To: "'Nikita Popov'" , "'PHP internals'" Date: Wed, 29 Aug 2012 17:21:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: Ac2C3E4zcsNqYRrxR8yH6HKktqzNFADJVmAg In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 Message-ID: <20120829162147.QQCM24459.aamtaout04-winn.ispmail.ntl.com@p2> X-Cloudmark-Analysis: v=1.1 cv=AUhbpHVS+xhHrj9wLCYAQoYnFLYUZdbP8UM0GmH2jwk= c=1 sm=0 a=uObrxnre4hsA:10 a=oHf_AeXmDeQA:10 a=kj9zAlcOel0A:10 a=QK7e9rkvuwEA:10 a=pGLkceISAAAA:8 a=67BIL_jfAAAA:8 a=ttOK41rBSsG_M9kS18sA:9 a=CjuIK1q_8ugA:10 a=MSl-tDqOz04A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Subject: RE: [PHP-DEV] [VOTE] Generators From: jared.williams1@ntlworld.com ("Jared Williams") References: > -----Original Message----- > From: Nikita Popov [mailto:nikita.ppv@gmail.com] > Sent: 25 August 2012 17:11 > To: PHP internals > Subject: [PHP-DEV] [VOTE] Generators > > Hi internals! > > I think the generators RFC has been discussed thoroughly > enough by now, so I opened the vote: > > https://wiki.php.net/rfc/generators#vote > > Thanks, > Nikita > Hi, Just discovered another seg fault. When iterating over a generator that returns references twice it causes a seg fault. function &bind(array $keys, array &$row) { foreach($keys as $key) yield $key => $row[$key]; } $row = []; $it = bind(['a', 'b'], $row); foreach($it as $key => &$ref) echo $key; echo "\n"; foreach($it as $key => &$ref) echo $key; Jared