# [VOTE] var deprecation

- Thread: https://externals.io/message/91889
- Original archive: https://news-web.php.net/php.internals/91889
- Started by Colin O'Dell on 2016-03-24T12:40:03+00:00
- Messages: 8
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #91889 — Colin O'Dell — 2016-03-24T12:40:03+00:00

URL: https://externals.io/message/91889#91889

Hello everyone,

It has been two weeks since discussion started on the RFC to deprecate and
eventually remove the "var" keyword (and one month since the idea was
originally proposed).

This RFC has therefore been moved to the "In Voting" state.  Voting will
begin immediately and will end in one week.

You can find the full RFC (including the proposed patch and automatic
upgrade tool) here: https://wiki.php.net/rfc/var_deprecation

I encourage everyone to read the RFC and cast your vote towards whichever
option you feel is the best for the language and the community.

Regards,

Colin O'Dell

---

## #91916 — Colin O'Dell — 2016-03-24T18:34:25+00:00

URL: https://externals.io/message/91889#91916 · In reply to: #91889

There have been some last-minute concerns raised about var being reserved
"for future usage".  My intent was that var couldn't be used for
function/class names IN CASE it was re-used in the future, but not
encouraging it to be re-used.  I'd assume that reusing it would require a
separate RFC to pass by a 2/3rds margin.

Does anyone disagree with this interpretation or feel that it should be
explicitly stated?  Would anyone change their vote from NO to YES if "for
future usage" was removed (but "reserving it" was kept in)?  Would anyone
change their vote from NO to YES if the question of "reserving it" could be
voted on separately?

If so, and we can stop the vote to make these changes, I'd strongly prefer
to do so.  I'd hate for three words to sink the entire RFC.

(My apologies if this belongs in the discussion thread instead)

Regards,

Colin



> Hello everyone,
>
> It has been two weeks since discussion started on the RFC to deprecate and
> eventually remove the "var" keyword (and one month since the idea was
> originally proposed).
>
> This RFC has therefore been moved to the "In Voting" state.  Voting will
> begin immediately and will end in one week.
>
> You can find the full RFC (including the proposed patch and automatic
> upgrade tool) here: https://wiki.php.net/rfc/var_deprecation
>
> I encourage everyone to read the RFC and cast your vote towards whichever
> option you feel is the best for the language and the community.
>
> Regards,
>
> Colin O'Dell

---

## #91921 — Mutlu Kocak — 2016-03-24T19:15:56+00:00

URL: https://externals.io/message/91889#91921 · In reply to: #91916

+1 var should be deprecated



> There have been some last-minute concerns raised about var being reserved
> "for future usage".  My intent was that var couldn't be used for
> function/class names IN CASE it was re-used in the future, but not
> encouraging it to be re-used.  I'd assume that reusing it would require a
> separate RFC to pass by a 2/3rds margin.
>
> Does anyone disagree with this interpretation or feel that it should be
> explicitly stated?  Would anyone change their vote from NO to YES if "for
> future usage" was removed (but "reserving it" was kept in)?  Would anyone
> change their vote from NO to YES if the question of "reserving it" could be
> voted on separately?
>
> If so, and we can stop the vote to make these changes, I'd strongly prefer
> to do so.  I'd hate for three words to sink the entire RFC.
>
> (My apologies if this belongs in the discussion thread instead)
>
> Regards,
>
> Colin
>
> On Thu, Mar 24, 2016 at 8:40 AM Colin O'Dell <colinodell@gmail.com
> <javascript:;>> wrote:
>
> > […]
> and
> > […]
>


-- 
Mutlu Koçak | Computer Scientist & Engineer
Mobile: +420775259871
Parizksa 5, Praha 1 Prague Czech Republic

Personal Website: http://www.mtkocak.com

---

## #91935 — Dmitry Stogov — 2016-03-25T07:12:28+00:00

URL: https://externals.io/message/91889#91935

Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove...

---

## #91938 — Thomas Punt — 2016-03-25T10:51:52+00:00

URL: https://externals.io/message/91889#91938

Hi Dmitry,

> Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove...

We're not going to remove the "var" keyword, just deprecate its usage in
the context of setting properties as public. The "var" keyword will still
remain a reserved word, and it can therefore still be reused in other places
if we so wish (as has been done with "use" for namespaces, traits, and
closures, as well as "as" in foreach, namespaces, and traits).

So whilst Java is adding "var" for a short-hand declaration via type inference,
it is only applicable to local variables and not properties. Deprecating "var"
in this context for PHP is therefore not really the inverse of what Java is doing.

-Tom

---

## #91940 — Christoph Becker — 2016-03-25T11:14:13+00:00

URL: https://externals.io/message/91889#91940 · In reply to: #91935

> Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove...

If this JEP is going to pass, "var" will be allowed to replace (local)
*type declarations*.  In PHP "var" is an alternative *visibility
specification*.  That's something quite different.

-- 
Christoph M. Becker

---

## #92045 — Colin O'Dell — 2016-03-31T12:41:29+00:00

URL: https://externals.io/message/91889#92045 · In reply to: #91940

The voting period for the "var deprecation" RFC has ended.  The final vote
was 31 in favor and 23 against.  The 2/3 majority requirement was not met
and therefore this RFC has been DECLINED.

https://wiki.php.net/rfc/var_deprecation#vote

I'd like to thank everyone who participated in the discussions, and a
special thanks to Thomas Punt for helping to create the proposed patch.

Regards,

Colin O'Dell



> 
>
> > […]
> going to remove...
>
> If this JEP is going to pass, "var" will be allowed to replace (local)
> *type declarations*.  In PHP "var" is an alternative *visibility
> specification*.  That's something quite different.
>
> --
> Christoph M. Becker

---

## #92070 — bjorn.x.larsson@telia.com — 2016-04-02T18:44:36+00:00

URL: https://externals.io/message/91889#92070 · In reply to: #92045

Hi,

Thanks for a well specified RFc and I got a nifty script to
update my old PHP 5.2 code :-)

Regards //Björn Larsson

Den 2016-03-31 kl. 14:41, skrev Colin O'Dell:
> The voting period for the "var deprecation" RFC has ended.  The final vote
> was 31 in favor and 23 against.  The 2/3 majority requirement was not met
> and therefore this RFC has been DECLINED.
>
> https://wiki.php.net/rfc/var_deprecation#vote
>
> I'd like to thank everyone who participated in the discussions, and a
> special thanks to Thomas Punt for helping to create the proposed patch.
>
> Regards,
>
> Colin O'Dell
>
> 
>
> > […]
