Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78977 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81496 invoked from network); 19 Nov 2014 03:03:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2014 03:03:28 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.174 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.174 mail-ig0-f174.google.com Received: from [209.85.213.174] ([209.85.213.174:61879] helo=mail-ig0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/00-15277-E780C645 for ; Tue, 18 Nov 2014 22:03:27 -0500 Received: by mail-ig0-f174.google.com with SMTP id hn15so2194009igb.13 for ; Tue, 18 Nov 2014 19:03:23 -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=f7A8/YjpQC5c0/xWfMZh0SZDdJMWnEk8hVvMLyxnzc4=; b=wKGomGx9Wn7UxE8jERci/4SIiA+wxt7VpDdM9Ssp55drHisKN4t3v2JdP/5oy/Km6r b/8LR4B3JBpEE2ciK9RSgava12frvzx8fUJDdHF8c2/FBca+MC51wr4gHWz4Gg5XGE+o riq3CdP2GQ9SaG6gj5N1JxYxZpE95Quv9jlsG/GERxIr8FuxMDhRVhAUemqwRA7DIeHa r0Sf0M/UBHQiryovf5ofoR7Us41uma/eYnT5piVv7G6rZd1xa7/jI+8Uz9v1y5SXSovx zLuZ9bbddqgVnhGG9nvXWjeR5oaRXKglh2+wOifeCXe6+Ywk6Hdxod8vU9hrDRoorJXw qwLA== X-Received: by 10.107.150.9 with SMTP id y9mr17344049iod.25.1416366203305; Tue, 18 Nov 2014 19:03:23 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.107.164.217 with HTTP; Tue, 18 Nov 2014 19:02:42 -0800 (PST) In-Reply-To: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> Date: Wed, 19 Nov 2014 12:02:42 +0900 X-Google-Sender-Auth: ARQabR9ugnBfK0lZ_JRFvfe0p70 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a1140acae6baa3a05082d7470 Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1140acae6baa3a05082d7470 Content-Type: text/plain; charset=UTF-8 Hi Andrea, On Tue, Oct 21, 2014 at 7:57 AM, Andrea Faulds wrote: > I am presenting a new RFC to add a set of three functions to do validated > casts for scalar types: > > https://wiki.php.net/rfc/safe_cast > I like this RFC overall. Precise parameter checks is good for security always. I would like to have DbC to harden app security as well. I'm looking for something like D language. http://dlang.org/contracts.html With DbC, checking parameter types/range/etc happen only when development. Therefore, app runs faster for production. All of runtime checks cannot be removed from app code by DbC, so this RFC is nice to have even with DbC. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1140acae6baa3a05082d7470--