Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84478 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93476 invoked from network); 9 Mar 2015 14:37:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2015 14:37:49 -0000 Authentication-Results: pb1.pair.com header.from=stelian.mocanita@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stelian.mocanita@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.175 as permitted sender) X-PHP-List-Original-Sender: stelian.mocanita@gmail.com X-Host-Fingerprint: 209.85.217.175 mail-lb0-f175.google.com Received: from [209.85.217.175] ([209.85.217.175:45476] helo=mail-lb0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DC/60-25443-D30BDF45 for ; Mon, 09 Mar 2015 09:37:49 -0500 Received: by lbiz12 with SMTP id z12so43649279lbi.12 for ; Mon, 09 Mar 2015 07:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=WWRbm1eins4RItbUfKpevAIWaD45402wrEScCFIUrL4=; b=m3U4D3KLO/sd2BMa3Lt7XE/Fgw5paYSSZzgSFM1LvxxNCCJOt6o8fs+nzrra3ygAcU IrzFEtwBgMbFiRM2+EQiy8WfZqEPhqZKSfwFMOzj4pvtqs0QEtzbRslJctbDcvG6ElD9 slgwK5dX0Sr3wk0QpL6N47hjr6RKeFqx4oriquWG+coHqoQ0F+hd8hEpLWfZdMLPZkOY B0pr1jKtOfNDUhB6EoiEIgMY01PUsxB4iY5dfrJhyCH/cSSqM4eIk/FNcy3oQaKKDOXg dEF9kUMZ4TRqlmBtSU+vmO60LZ0oSKP8ZSyY1FSJ/IpsllAFGe0b3eIEESXT/Dl8Tcjj THlg== MIME-Version: 1.0 X-Received: by 10.112.235.38 with SMTP id uj6mr26476343lbc.9.1425911866233; Mon, 09 Mar 2015 07:37:46 -0700 (PDT) Sender: stelian.mocanita@gmail.com Received: by 10.112.217.11 with HTTP; Mon, 9 Mar 2015 07:37:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Mar 2015 15:37:46 +0100 X-Google-Sender-Auth: dO2hk40wHUdKO--_ZE8WvA3AM_c Message-ID: To: Kalle Sommer Nielsen Cc: Shawn McCool , Mike Dugan , PHP internals list Content-Type: multipart/alternative; boundary=001a11c3cf28449a280510dbfacf Subject: Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC From: stelianm@php.net (Stelian Mocanita) --001a11c3cf28449a280510dbfacf Content-Type: text/plain; charset=UTF-8 On top of the cultural disposition, there is also the fact that things should not be removed from the language without deprecating them, so at best 7.0 would emit and E_DEPRECATED for the usage of "@". - Stelian On Mon, Mar 9, 2015 at 3:31 PM, Kalle Sommer Nielsen wrote: > Hi > > 2015-03-09 15:11 GMT+01:00 Shawn McCool : > > I guess that if I thought that PHP would change its scoping, I would have > > tried for that. > > Well take this code into consideration: > class A { > protected $b; > > function c($b) { > $b = $b; // does not work > } > > function d($d) { > $b = $d; // works > } > } > ?> > > A::c() will fail because the parameter $b conflicts with the property > A::$b, but example works because the parameter is now named $d, and > therefore making $b available for assignment (should probably > internally be implemented as a reference to $this->b), but only on > demand (JIT) to avoid extra memory consumption. > > This approach may seem quirky at first, but it doesn't add any new > syntax but some magic behind the scenes. Although I personally am not > a huge fan of magic variables like that, it is possible. > > > > -- > regards, > > Kalle Sommer Nielsen > kalle@php.net > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --001a11c3cf28449a280510dbfacf--