Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91480 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81897 invoked from network); 3 Mar 2016 13:06:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Mar 2016 13:06:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wm0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:37258] helo=mail-wm0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/4A-21983-8D638D65 for ; Thu, 03 Mar 2016 08:06:33 -0500 Received: by mail-wm0-f54.google.com with SMTP id p65so30787229wmp.0 for ; Thu, 03 Mar 2016 05:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=cnysJE0QGruoyLHEeLw++mzUx+b1hoiCRNEWD/QV8i4=; b=WvZc0oe8t9G/VOuOo8jOvPivWjCQBS2b9eCiI1/ylAUbfKFBlOC+J5Sd92SqpEg3J9 sG6CBwqeklb9xo7NLwPhfS5PG3FXmWg1mPXhmuXY/8mDiK18JO5uOQflsd98C5/trm+v xrH3Os60WG7O5fCbZUx/Hcy6xbry9MpsDO8MZiw9mmlmdLlyLHCocvEa2Mcqo3f8gjKm 5CgGDkMLfk2kxcqLonMJUwPICiCtTHwePmTvYj3Z0r6CKxONWYLbp1q5OOx+AJ/NE3uK mGzGYSnjGcLW0oiYeqolQp+HfT7llw1Fwqw6JOSfjMZyS2VCBqdSIqagSNpDzItGMaRF b+Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=cnysJE0QGruoyLHEeLw++mzUx+b1hoiCRNEWD/QV8i4=; b=m79l33uV8hsnOma7DCMFbsAZuwLt115NcczL0ISDnhIlgfK+HcRcZ6vY7qWbAWDgZo 7U5yX+Maqf6FbsJlKu7C15lxzIe/S6yaa4CA0NJwtnVmHigFFfzLvvDhBYktn4yn232D q57gBJwaRNnoL+ESHooKMaQhf08x29hycfsfuDUMmjutWRgSuepGl8oL1UWRh5PSkV5o Er/bxbtf6SIuNF/pMEjpRJOiVJENt0Dh1ZJD9FKKD2+lmES4mtOubHrN2dRIA9UBGf+c BpuUCQA2p73Q8acD14o8FRCD2+AZmdHWKfmrvDsSV1RXWlUWchZsrFOmYdoeTXTCc9xL OH3A== X-Gm-Message-State: AD7BkJLJWkQcMo9UcQjchMjBjl8MCnieoqqm/PdB2G9hrgWOuQuJehOk5pwh1FPDilczwQ== X-Received: by 10.28.224.195 with SMTP id x186mr3292909wmg.21.1457010389492; Thu, 03 Mar 2016 05:06:29 -0800 (PST) Received: from [192.168.0.141] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id v2sm8877853wmd.24.2016.03.03.05.06.27 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2016 05:06:28 -0800 (PST) To: internals@lists.php.net References: <1F.91.55238.41F10D65@pb1.pair.com> <56D42CD3.6020602@gmail.com> <56D57DF4.8000906@gmail.com> <56D5D2AD.6070805@gmail.com> <56D5DDA6.4080607@fleshgrinder.com> <40.73.36499.548B6D65@pb1.pair.com> <56D6BBD0.5010505@gmail.com> <56D73386.3000903@fleshgrinder.com> <86.68.21983.A2508D65@pb1.pair.com> <56D80C33.2070102@lsces.co.uk> Message-ID: <56D83678.1090006@gmail.com> Date: Thu, 3 Mar 2016 13:04:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal From: rowan.collins@gmail.com (Rowan Collins) Colin O'Dell wrote on 03/03/2016 12:47: > If you're staying on PHP 5.x or 7.0, no changes would be needed. If you're > upgrading to 7.1+, you would need to either hide deprecation notices or > take 30 seconds to run that script. This isn't quite true. At the moment, PHP has no mechanism for hiding notices within particular libraries, so if you're using a third-party library, you have to either persuade the maintainer to put out a new release, or maintain a fork, either of which may require significant effort. > My understanding is that 'var' is simply an alias for 'public' so they > should behave identically. Could you please provide an example where 'var' > is not replaceable by 'public'? I'm not sure what Lester had in mind, but in many cases legacy code which used "var" should actually be updated to mark properties as "protected" or "private" instead. Such properties are public only because PHP4 had no other visibility, and explicitly marking them all as "public" simply masks the real job, which is assessing which visibility each property should have. It occurs to me that if I saw "var", I would not think "that should be public", but "that needs assessing for visibility". I do the same with legacy code where methods are written as "function foo()" rather than "public function foo()" - I check whether it should actually be public, and also in that case whether it should be static. Regards, -- Rowan Collins [IMSoP]