Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91504 invoked from network); 9 Mar 2015 14:31:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2015 14:31:29 -0000 Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.179 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.217.179 mail-lb0-f179.google.com Received: from [209.85.217.179] ([209.85.217.179:40823] helo=mail-lb0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/00-25443-EBEADF45 for ; Mon, 09 Mar 2015 09:31:27 -0500 Received: by lbiw7 with SMTP id w7so32089989lbi.7 for ; Mon, 09 Mar 2015 07:31:24 -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=f4th0RlywiQ9NAJpYZirKNFfuNBOQs6+UnERz0m632Q=; b=NnQw+qyjOtEgIw8+apR8mmigoJYYbbfS2aCqwZcRU8b3Eha6IL6+QQnskNtsRmSdHL AWRsoShTWBGS/5R59VW/kLYgcmmIccWXpspEboSdnfnnj7V1QgTboo+RbxbaQJ5Z9AKL WRAmkQe0MAkvw2b0a0hVjC1pmbjU5G1+TxeEGhrEUiAdaHIc30l04AAl5R3FwAJonPye 7S3f+EmY1arPpMAaay1Q7vkPRDtYllrkxz2nlITqaMbIh/jEK5BmeV89cRgMgGT14hL+ 5mQQhRZ+8vWXB9DnzerQJVSrxKIiqZS9ziWWBxCUJTPz1B6v4ZTDChrN9kShqBZvQvd1 /YSQ== MIME-Version: 1.0 X-Received: by 10.112.159.195 with SMTP id xe3mr26379532lbb.64.1425911484130; Mon, 09 Mar 2015 07:31:24 -0700 (PDT) Sender: kalle.php@gmail.com Received: by 10.112.28.9 with HTTP; Mon, 9 Mar 2015 07:31:23 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Mar 2015 15:31:23 +0100 X-Google-Sender-Auth: eSxPQOuaZwg-ND0A5aSuPqLUdTk Message-ID: To: Shawn McCool Cc: Mike Dugan , PHP internals list Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC From: kalle@php.net (Kalle Sommer Nielsen) 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: 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