Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41565 invoked from network); 14 May 2015 09:21:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 May 2015 09:21:29 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:35021] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/75-31470-71964555 for ; Thu, 14 May 2015 05:21:28 -0400 Received: by wicmx19 with SMTP id mx19so8416372wic.0 for ; Thu, 14 May 2015 02:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=40XiEEDC/JcpW2lmjSNTkvTNcRwyloKoyLvNLSZE8pw=; b=gYnfFqFPLFmoCxHtQZMqV1cYepw7KgrJqqaIUFoMdN4IhhphXQztJ3po9yfPU7TZ2J Mre5IJG4XNVq43D1hYraQucKA+Nqgo3WfsRUi07W7Bdve7VCO45qhTl2gtCA8XbpTNBn ZG50mlUzikFFOXKnF7Qb7CAE2tRH+g8HScoOaT88FSqjP/BrbCBIIUsFpEk4WfnrjiW8 ynbBGjmV3MVDPLt7YbxQ4ug3eXC5g3Ky3pFdBuJ1+LIl4mw6zL1V2belxyQKe0n8br+H l5yBEQnqDsd4T6Nnz+trSkEKDfAjRlOuu26EGI0b6Sh7XhyMMtSGtfoJIRb4eu6Tsxen vhWg== X-Received: by 10.180.74.238 with SMTP id x14mr47887951wiv.81.1431595284512; Thu, 14 May 2015 02:21:24 -0700 (PDT) Received: from [192.168.0.159] ([62.189.198.114]) by mx.google.com with ESMTPSA id l3sm12270885wik.16.2015.05.14.02.21.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 02:21:23 -0700 (PDT) Message-ID: <5554689E.6030408@gmail.com> Date: Thu, 14 May 2015 10:19:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <55518D59.6070108@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] is_digits() and digits type From: rowan.collins@gmail.com (Rowan Collins) Yasuo Ohgaki wrote on 14/05/2015 06:19: > I guess DbC will not prevent users from abusing type hints, though. They'll only "abuse" them in exactly the same way they currently "abuse" existing checks and casts. e.g. $id = intval($_GET['id']); looks perfectly reasonable to most people, but if you want to use a 64-bit ID on a 32-bit system, you will consider that a bug. If someone uses an int typehint for the same purpose then it is, equally, a bug. The result of one will probably be retrieving the wrong data, and thus potential leak or corruption; the result of the other will probably be a fatal error, which at least stops the broken code in its tracks. Regards, -- Rowan Collins [IMSoP]