Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61881 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83645 invoked from network); 30 Jul 2012 17:48:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2012 17:48:16 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:46029] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/73-00342-ED8C6105 for ; Mon, 30 Jul 2012 13:48:15 -0400 Received: by qcmt36 with SMTP id t36so3713197qcm.29 for ; Mon, 30 Jul 2012 10:48:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uUqY2ead+F9mz1tu+uPcFxmdwWLZHHzfJ9bm/nReDYc=; b=I5z180AvfMsl787ehwNK2A4hdx/5ZmvABfGGbV+Ed4WpXhDYDCQn3+sZy+b9MASNP4 nE7caOAlAebyyNBFV5xMDPB8wFhdAgPvEorlUXnHzHVneTJhpbWTtBGSUbmLyZpftbOo Ecg2YqlAkBk6waGXIMS1Lf41d/3RqG9KUMmY0wJDcTmazfPkON+oQTr/E91xNlODJbYd P1NO2NHXkp4SGlflsJX56ANuHNt2f2I3b4iYXVqE5HHmdXN5W0BECRivVFjykyaKX/sN Tsy+5xi0mz825KuJ2r1ip5ecruSRR67ZL+GxZOIduJQuyh7RvX8y0y9ZdQuekgBUSZWz TfwA== MIME-Version: 1.0 Received: by 10.229.111.66 with SMTP id r2mr5959574qcp.62.1343670492380; Mon, 30 Jul 2012 10:48:12 -0700 (PDT) Received: by 10.229.182.4 with HTTP; Mon, 30 Jul 2012 10:48:12 -0700 (PDT) In-Reply-To: References: Date: Mon, 30 Jul 2012 13:48:12 -0400 Message-ID: To: Gustavo Lopes Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=0023544716f064c04504c60faa82 Subject: Re: [PHP-DEV] [RFC] Remove calls with incompatible Context From: ircmaxell@gmail.com (Anthony Ferrara) --0023544716f064c04504c60faa82 Content-Type: text/plain; charset=ISO-8859-1 Gustavo, On Mon, Jul 30, 2012 at 1:31 PM, Gustavo Lopes wrote: > https://wiki.php.net/rfc/**incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. A few points. 1. Finally! It's caused a lot of WTF moments. 2. I have seen it in production code. Usually it wasn't intentional, but changing it would definitely break things pretty bad... (Not a reason not to change it, just pointing out that I have come across it). 3. You'd need to be careful to ensure that the error is raised only when the called class is not in the same tree. http://codepad.viper-7.com/sOLCDu Otherwise it would be difficult to call grand-parent code (skipping the parent, if needed)... Nice job. Anthony --0023544716f064c04504c60faa82--