Re: Change &null; from NULL to null, etc.

From: Date: Fri, 02 Dec 2016 09:25:40 +0000
Subject: Re: Change &null; from NULL to null, etc.
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969386410@lists.php.net to get a copy of this message
On 25 November 2016 at 14:16, Christoph M. Becker <cmbecker69@gmx.de> wrote: > Hi! > > Since a long time there is a patch from Marco Pivetta in the online > editor suggesting to change some initializers from &null; > to null, > and I wonder if we should change the definition of the entities > &null;, &false; and > &true; from upper case to lower case. While > constants are usually written all upper case, these three reserved words > are commonly spelled in lower case, what is required by PSR-2[1] and the > PEAR coding standards[2]. > > Thoughts? > I have no strong thoughts either way and it seems like change for change's sake. I like the distinction between NULL the value and null the type, but that's about all that's going for the existing convention.. As an aside, since you mentioned the PEAR coding standards which our examples are supposed to follow, it appears that a majority of our examples use the lower-case names already, though those using the uppercase names is not small. It might be worth making them consistent. > > [1] <èxU›®f÷ > gô  Þð!\http://www.php-fig.org/psr/psr-2/#2-5-keywords-and-true-false-null> > [2] <https://pear.php.net/manual/en/standards.naming.php> > > -- > Christoph M. Becker >

« previous php.doc (#969386410) next »