Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83990 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31663 invoked from network); 27 Feb 2015 10:25:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 10:25:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.50 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.50 mail-qg0-f50.google.com Received: from [209.85.192.50] ([209.85.192.50:47117] helo=mail-qg0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/8B-32582-53640F45 for ; Fri, 27 Feb 2015 05:25:58 -0500 Received: by mail-qg0-f50.google.com with SMTP id e89so13247999qgf.9 for ; Fri, 27 Feb 2015 02:25:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Pi+a359+odAPsDXR5OkgRPElTvwMMu7/2jn1zvE08Kc=; b=Ph6o34hVm44yAgbvpdgw4/jj0hmtQ3Bp0W1m+n6LFYkKtHPCUVNxYHVQ1LPYrkBBRk N7HzCl3T0fRRS41B/AFdhxZXWGBvQQFe66P3kdPcAML/CwBZepmR2ckvDkpepEZIbiB9 626pRb6jiJ3cVPTDdz4Q3f3x6CdS3mwiB8V2criLU+Zz2do64VaqeOXhVtDvF4LtLKOl n7K8BJnE71G+u1aYHjgRPtn0G2Rpdp5pFrpl9cE+vSA5VILfkILpeD5KHpwPrgemn0k+ 33Q6an60XfpDk9kp8rW0cLM+8N+wLN1RzCiWtMymdGOSMtX9L8UGH+4jDwUtjupbAe4M EpJA== X-Received: by 10.140.82.71 with SMTP id g65mr26049250qgd.42.1425032755168; Fri, 27 Feb 2015 02:25:55 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Fri, 27 Feb 2015 02:25:14 -0800 (PST) In-Reply-To: <3d639901ae85227b219e7ee59b3140fe@mail.gmail.com> References: <3d639901ae85227b219e7ee59b3140fe@mail.gmail.com> Date: Fri, 27 Feb 2015 19:25:14 +0900 X-Google-Sender-Auth: epYS2gQkoD94iQq-avqG9gIznTU Message-ID: To: Zeev Suraski Cc: Theodore Brown , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c1169a2a4d7c05100f4b89 Subject: Re: [PHP-DEV] A different user perspective on scalar type declarations From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c1169a2a4d7c05100f4b89 Content-Type: text/plain; charset=UTF-8 Hi Zeev, On Fri, Feb 27, 2015 at 2:48 AM, Zeev Suraski 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 --001a11c1169a2a4d7c05100f4b89--