Re: A different user perspective on scalar type declarations
| From: | Yasuo Ohgaki | Date: | Fri, 27 Feb 2015 10:25:14 +0000 |
| Subject: | Re: A different user perspective on scalar type declarations | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83990@lists.php.net to get a copy of this message | ||
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