Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71675 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7715 invoked from network); 28 Jan 2014 16:06:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2014 16:06:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.247 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.247 imap4-3.ox.registrar-servers.com Received: from [198.187.29.247] ([198.187.29.247:35154] helo=imap4-3.ox.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/D0-01140-F65D7E25 for ; Tue, 28 Jan 2014 11:06:09 -0500 Received: from localhost (localhost [127.0.0.1]) by oxmail.registrar-servers.com (Postfix) with ESMTP id A039056007B; Tue, 28 Jan 2014 11:06:04 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap4.ox.registrar-servers.com Received: from oxmail.registrar-servers.com ([127.0.0.1]) by localhost (imap4.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qJc5yNH3eh0v; Tue, 28 Jan 2014 11:06:04 -0500 (EST) Received: from [192.168.0.200] (unknown [176.25.177.94]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 79C58560075; Tue, 28 Jan 2014 11:06:03 -0500 (EST) Message-ID: <52E7D569.3020700@ajf.me> Date: Tue, 28 Jan 2014 16:06:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Sebastian Krebs CC: PHP internals list References: <1796143171.126442.1390903281925.open-xchange@app2.ox.registrar-servers.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Lexical scoping From: ajf@ajf.me (Andrea Faulds) On 28/01/14 12:31, Sebastian Krebs wrote: > foreach ($array as &$a) { > $a = 3; > } > $a = null; // $a not a reference anymore. Problem solved :) You just changed the last element of the array to null. See why I proposed this? ;) -- Andrea Faulds http://ajf.me/