Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85983 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11932 invoked from network); 28 Apr 2015 05:31:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2015 05:31:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.42 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.42 mail-pa0-f42.google.com Received: from [209.85.220.42] ([209.85.220.42:33318] helo=mail-pa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/90-17556-52B1F355 for ; Tue, 28 Apr 2015 01:31:18 -0400 Received: by pacwv17 with SMTP id wv17so131277930pac.0 for ; Mon, 27 Apr 2015 22:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=T/SZ0Nt4I8Xj3+SxKtOzeLE14OdlXOqnG0hzNJc7Vno=; b=ux5QIn0rRad3VaM6Xd9DfyKTuINa4ppAoy0gQXTPCPYQX0cRglcXLvQ7J7SRkA2h0n HLdntow5stb0GMHAKI6Mw2CNCYh/Q6lCzZRi9d8phis964tzTudkqsSR0OwflDBrqUe2 aSMzCPP83FVDmP5JA4qtlHYwja+6wDFk91gowwIADUiwQ2RShmnbRhO3qcQr/9kzrG3h DJkhtK6NmxgiBRMGUi6YZyx8cKnlrvlUU/nxHAkT/3h1eABEcYR+/ayqonT2o5GIFUcj BO1UFjvIcXoVpu0GJrfNFGAATZungw+h4wX1X0oi5CxCiQM6yLma2OoiYtxNLemBQP7Z 6ezg== X-Received: by 10.68.69.35 with SMTP id b3mr16893484pbu.96.1430199074852; Mon, 27 Apr 2015 22:31:14 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id v5sm15171340pdo.29.2015.04.27.22.31.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Apr 2015 22:31:13 -0700 (PDT) Message-ID: <553F1B0F.8070303@gmail.com> Date: Mon, 27 Apr 2015 22:30:55 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Julien Pauli CC: Andrew Faulds , PHP Internals References: <55342A50.9030100@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Closure::call() to access private data, really ? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Perhaps the best thing to do is to forbid rebinding a Closure to an > internal class ? So I have checked into this further, and the good news is that we don't have too many internal classes that declare private/protected properties. Actually, the only one where you could mess stuff up was Exception, and that seems to be recently fixed by adding typechecks for (almost) unrelated unserialize issue. So for now, I do not see a lot of ways to mess things up in core PHP. Of course, third-party extensions may be different. Still, I don't like the idea of rebinding to internal classes too much (in fact, I'm not sure I like the whole rebinding thing as such in general, but that's another story) so here's a pull that forbids this: https://github.com/php/php-src/pull/1253 Please review and comment. -- Stas Malyshev smalyshev@gmail.com