RE: [PHP-DEV] A different user perspective on scalar type declarations

From: Date: Fri, 27 Feb 2015 13:12:07 +0000
Subject: RE: [PHP-DEV] A different user perspective on scalar type declarations
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-83998@lists.php.net to get a copy of this message
Hi, If we allow for trailing blanks, we'll allow the same set of chars that is already allowed for leading blanks. I say'blanks' and not 'whitespaces', because here is the list currently allowed as leading blank (with ascii values) : Space (32) , tab (9) , linefeed (10), carriage-return (13), vertical tab (11), and form feed (12). > -----Message d'origine----- > De : yohgaki@gmail.com [mailto:yohgaki@gmail.com] De la part de Yasuo > Ohgaki > Envoyé : vendredi 27 février 2015 11:25 > À : Zeev Suraski > Cc : Theodore Brown; internals@lists.php.net > Objet : Re: [PHP-DEV] A different user perspective on scalar type > declarations > > Hi Zeev, > > On Fri, Feb 27, 2015 at 2:48 AM, Zeev Suraski <zeev@zend.com> wrote: > > > You may have a point there. As Francois said, he was in favor of allowing > > leading and trailing spaces. I'll definitely reconsider. > > > > If we consider existing code, leading/trailing spaces may need to be > allowed. > Without considering compatibility issues, leading/trailing spaces should be > validated or removed by user input validation/filter code in the first > place. > > I think many users use "$" for the end of string data for regex, but it > includes > newline. To be precise, "\z" should be used for both PCRE and mbregex. > > http://perldoc.perl.org/perlre.html > > Trailing newline is invalid. Leading/trailing spaces may be considered as > the > same invalid data to be strict. > > This is what I thought for this. > I don't have strong opinion. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net

« previous php.internals (#83998) next »