Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67580 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28141 invoked from network); 28 May 2013 09:20:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2013 09:20:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=amaury.bouchard@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=amaury.bouchard@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.179 as permitted sender) X-PHP-List-Original-Sender: amaury.bouchard@gmail.com X-Host-Fingerprint: 209.85.216.179 mail-qc0-f179.google.com Received: from [209.85.216.179] ([209.85.216.179:35443] helo=mail-qc0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/3D-44058-1E674A15 for ; Tue, 28 May 2013 05:20:34 -0400 Received: by mail-qc0-f179.google.com with SMTP id e1so3956110qcx.10 for ; Tue, 28 May 2013 02:20:30 -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:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=ZqZgixJ8ktK+Oc0GDJsemk7WFaonSmj91542doCQuac=; b=VA/ztMuP6wU+CnUeOobjGo7TKUzBNMOSLYvfLf+RZ/5V9IEzZawwkaQiKPP/x1PJlI 2G+Gt0uvMH0wF7ulIAEeFcFq2BaknxBjh/ShhW7ae0GcSJjBjBXKD8CE6xeso3Hdxabf LhfpCB+dLG89MJWqNrY7+drQpJFBbg9dVjX1GrUpMm5YlMjsnK04blZyNvSaEK3IuJsk EZlwLP4+ZnZ1CbKuLSgSA6vHex6Ur6bx48LETJc7v+xVz4axv/HHoXxEmqZDFWOpsGIY ID/4nqLIVc4VAOz3WuZgtDQe+HnVg7m3ZS/oWogjUkVoBBoIMVC3EFwqEYe4ijElI/Hb iVOA== X-Received: by 10.229.63.2 with SMTP id z2mr11810183qch.53.1369732830626; Tue, 28 May 2013 02:20:30 -0700 (PDT) MIME-Version: 1.0 Sender: amaury.bouchard@gmail.com Received: by 10.49.49.133 with HTTP; Tue, 28 May 2013 02:20:10 -0700 (PDT) In-Reply-To: <51A474F0.4040408@php.net> References: <06F1F2BA-A054-4B62-AD06-90B621995ADD@strojny.net> <51A474F0.4040408@php.net> Date: Tue, 28 May 2013 11:20:10 +0200 X-Google-Sender-Auth: ri0Aln909o-8-dRXZ-1W0AClHLc Message-ID: To: Maciek Sokolewicz Cc: Lars Strojny , Ferenc Kovacs , PHP Internals Content-Type: multipart/alternative; boundary=001a11c24ed4ce89a304ddc3c6b9 Subject: Re: [PHP-DEV] supporting the final keyword for properties From: amaury@amaury.net (Amaury Bouchard) --001a11c24ed4ce89a304ddc3c6b9 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2013/5/28 Maciek Sokolewicz > It=92s a good idea in general but what about having it for variables as >> well? Could open interesting possibilities for an optimizer. >> >> final $foo =3D "str"; >> $foo =3D "bar"; // bails out >> >> Don't we already have that? It just has a different name: constants. It's different. You can manipulate variables in some ways you can't with constants. This code, for example: $a =3D 'abc'; $b =3D 'a'; print($$b); It will display "abc". It's currently not possible to do something similar with constants. I think the subject was already debated, but I wonder why we should write that: final $foo =3D 'bar'; instead of: const $foo =3D 'bar'; --001a11c24ed4ce89a304ddc3c6b9--