rfc:rename-double-colon-token

PHP RFC: Rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON

Introduction

The T_PAAMAYIM_NEKUDOTAYIM token representing the :: characters sequence is often a source of confusion the first time it is encountered.

Historical significance

The T_PAAMAYIM_NEKUDOTAYIM token first appeared in version 0.5 of the Zend Engine, which powered PHP 3, and which was developed in Israel.

This continues to remind us of the major contribution the Israeli community has brought to PHP by laying its modern foundation.

This information is available on the Scope Resolution Operator[1] page.

Newcomer experience

Seeing a really cryptic message during a parse error can lead to frustrations as it's not obvious what is wrong. Although it is true that a simple online search will usually grant an explanation of what the issue is.

However, PHP is for most people their first programming language and therefore may not have the instinct to do an online search and will end up frustrated.

Why fix it now?

We believe that PHP is still an active and growing language and that improving the newcomer experience is something we should strive for.

Proposal

Rename the T_PAAMAYIM_NEKUDOTAYIM token to its alias T_DOUBLE_COLON.
And make T_PAAMAYIM_NEKUDOTAYIM an alias to T_DOUBLE_COLON.

Backward Incompatible Changes

None, as T_PAAMAYIM_NEKUDOTAYIM will become an alias to T_DOUBLE_COLON.

Proposed PHP Version

PHP 8.0.

Future Scope

Starting with PHP 8.0, it is possible to deprecate global constants within the engine [2], therefore we might consider deprecating the T_PAAMAYIM_NEKUDOTAYIM constant in a future version.

Vote

Yes/No with 2/3 majority.

Voting started 2020-06-25 and ends 2020-07-09.

Rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON?
Real name Yes No
ajf (ajf)  
alcaeus (alcaeus)  
alec (alec)  
andi (andi)  
as (as)  
asgrim (asgrim)  
ashnazg (ashnazg)  
beberlei (beberlei)  
bmajdak (bmajdak)  
brzuchal (brzuchal)  
bwoebi (bwoebi)  
carusogabriel (carusogabriel)  
cschneid (cschneid)  
danack (danack)  
daverandom (daverandom)  
davey (davey)  
derick (derick)  
dmitry (dmitry)  
dragoonis (dragoonis)  
duodraco (duodraco)  
ekin (ekin)  
galvao (galvao)  
geekcom (geekcom)  
girgias (girgias)  
guilhermeblanco (guilhermeblanco)  
heiglandreas (heiglandreas)  
ilutov (ilutov)  
irker (irker)  
jasny (jasny)  
jbnahan (jbnahan)  
kalle (kalle)  
kaplan (kaplan)  
kelunik (kelunik)  
klaussilveira (klaussilveira)  
kocsismate (kocsismate)  
krakjoe (krakjoe)  
laruence (laruence)  
levim (levim)  
lstrojny (lstrojny)  
marandall (marandall)  
marcio (marcio)  
mariano (mariano)  
mbeccati (mbeccati)  
mcmic (mcmic)  
mfonda (mfonda)  
nicolasgrekas (nicolasgrekas)  
nikic (nikic)  
ocramius (ocramius)  
patrickallaert (patrickallaert)  
peehaa (peehaa)  
pmjones (pmjones)  
ralphschindler (ralphschindler)  
ramsey (ramsey)  
rasmus (rasmus)  
remi (remi)  
reywob (reywob)  
royopa (royopa)  
salathe (salathe)  
sebastian (sebastian)  
sergey (sergey)  
stas (stas)  
subjective (subjective)  
svpernova09 (svpernova09)  
tandre (tandre)  
theodorejb (theodorejb)  
thijs (thijs)  
thorstenr (thorstenr)  
till (till)  
trowski (trowski)  
villfa (villfa)  
wyrihaximus (wyrihaximus)  
yunosh (yunosh)  
zeev (zeev)  
zimt (zimt)  
Final result: 44 30
This poll has been closed.

Patches and Tests

References

rfc/rename-double-colon-token.txt · Last modified: 2020/07/11 12:41 by kalle