Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93476 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61195 invoked from network); 24 May 2016 08:05:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2016 08:05:02 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.49 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.49 mail-pa0-f49.google.com Received: from [209.85.220.49] ([209.85.220.49:33046] helo=mail-pa0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/54-37212-D2B04475 for ; Tue, 24 May 2016 04:05:02 -0400 Received: by mail-pa0-f49.google.com with SMTP id xk12so4407408pac.0 for ; Tue, 24 May 2016 01:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=NxolRaBnF59SBvXq3iCv2xlisit/g2SGg6vc0Kwb1a8=; b=p/p7YaYfFxa+YwsUiuJla0xv/gZBFF2J6yKAZRSHz7xiRJePoS+98cplGSbMP3gQ3H L1der9d/vnPn/B4dRW9Jg/kPOFHCloWCHjAoq01rZLWau+D02Ymbs62kcvNjcI0yd3kY zCo5uKNfjo9edXe9Z+EtTQJNsvTab1x58ZshD0wFcBUbjIpqdQmAt+RM+CcjPR/mUxgz 9HavcrQ1WLGP2I+08rHDaRx7hhldhttLqzU7JlpIcVpWSioSTDlbFZF1FvhnD/GtSJbt CupRenNiYy5BT+pFVZwC7efUGKVCC0MeR5z7QWRr/92U9y5TzNRm9SKdatj2I/ZD25px yUdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=NxolRaBnF59SBvXq3iCv2xlisit/g2SGg6vc0Kwb1a8=; b=k4PlRRQRQdvoNHdEqIW1eHE5EEcNSfQKu5yNj2BYyftzFftkU1hRZcXlJoCMePYCvY MYMg2NQLQijM2PybnXb3zhTwt8RHNBLSTmG4Dib79A9I+WB+aeMF0QgTkMORybGVX5Or 4B5Wkbq0AgJ0RaxoNyzQ375owzYjooS++fOhkYdoc9gJgTHBXcdFxZHTcbjNT+DsTkSZ XDraDmqGiPuQeDH8U4T+lziDf6VpB+6kfu5ljgdxKrYpvfNlZMreuM70IDvwXjZM1IQ0 OEq4EtK/cfiE2rnMZK/+KOobDD/drO9DxqQO9u1C79eN4V2BCYxTYUY1Hi+KQkQQu4iV 5/IQ== X-Gm-Message-State: ALyK8tL8i2p4ewHfBxczWCR2dH9tLS0oyMhGbODsfjEEGSNek5ButM6Nkq63FaUCZlASCw== X-Received: by 10.66.249.228 with SMTP id yx4mr4740639pac.29.1464077098882; Tue, 24 May 2016 01:04:58 -0700 (PDT) Received: from Stas-Air.local (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id u65sm51974717pfa.9.2016.05.24.01.04.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 May 2016 01:04:57 -0700 (PDT) To: Dmitry Stogov , internals References: <478356f3-cc53-d419-cfea-0a6bbd782031@gmail.com> Cc: Nikita Popov , Bob Weinand , Xinchen Hui Message-ID: Date: Tue, 24 May 2016 01:04:53 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Fix inconsistent behavior of $this variable From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Keeping inconsistent behavior isn't good as well. It's not good, but it's not also very bad. Nobody really does that, so whatever happens in these cases is mostly irrelevant. Did you test performance impact of those changes? > Actually, $this may be assigned to local variable in run-time only in 3 > places: through $$, extract() and parse_str()/1. For now, maybe. But every time we do something with local symbol table, we'd have to do special case for this. E.g., throretically, what if we wanted to add function to Closure that allows to access to captured scope - we'd need to special-case $this there. Etc... > If we remove this checks, we go back to 7.0 behavior - we create a local > variable $this, that has nothing in common with real internal $this > stored in EX(This). That's not good, but maybe we could make them agree in some way? > In most cases it doesn't show $this in 7.0. Right. But you're changing 7.0 behavior anyway? -- Stas Malyshev smalyshev@gmail.com