Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83998 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53729 invoked from network); 27 Feb 2015 13:12:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 13:12:21 -0000 Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:54507] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/CE-32582-13D60F45 for ; Fri, 27 Feb 2015 08:12:19 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id CC6144B02B8; Fri, 27 Feb 2015 14:11:50 +0100 (CET) Reply-To: To: "'Yasuo Ohgaki'" , "'Zeev Suraski'" Cc: "'Theodore Brown'" , References: <3d639901ae85227b219e7ee59b3140fe@mail.gmail.com> In-Reply-To: Date: Fri, 27 Feb 2015 14:12:07 +0100 Message-ID: <0b3a01d0528e$fdf61160$f9e23420$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGwbbdURx2shUG2o7Zj2Ywptu8MnAHNhHseAdPaHredJzTW4A== Content-Language: fr X-Antivirus: avast! (VPS 150227-0, 27/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] A different user perspective on scalar type declarations From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) 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=C3=A9 : vendredi 27 f=C3=A9vrier 2015 11:25 > =C3=80 : Zeev Suraski > Cc : Theodore Brown; internals@lists.php.net > Objet : Re: [PHP-DEV] A different user perspective on scalar type > declarations >=20 > Hi Zeev, >=20 > On Fri, Feb 27, 2015 at 2:48 AM, Zeev Suraski wrote: >=20 > > You may have a point there. As Francois said, he was in favor of = allowing > > leading and trailing spaces. I'll definitely reconsider. > > >=20 > 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. >=20 > 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. >=20 > http://perldoc.perl.org/perlre.html >=20 > Trailing newline is invalid. Leading/trailing spaces may be considered = as > the > same invalid data to be strict. >=20 > This is what I thought for this. > I don't have strong opinion. >=20 > Regards, >=20 > -- > Yasuo Ohgaki > yohgaki@ohgaki.net