Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85008 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27496 invoked from network); 16 Mar 2015 09:00:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 09:00:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.42 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.192.42 mail-qg0-f42.google.com Received: from [209.85.192.42] ([209.85.192.42:32934] helo=mail-qg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/84-00492-FBB96055 for ; Mon, 16 Mar 2015 04:00:47 -0500 Received: by qgfa8 with SMTP id a8so34278145qgf.0 for ; Mon, 16 Mar 2015 02:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3MT6IgPg7o9/BxRtrZaT6qactwJkXRfk0fKZVleT+EI=; b=RfMweNXEI4aZViAgHbPrQUG/rdcwmhX796834PLnSc5tgpCFsjSSTDB4GG1G8/bXfh YutgTAKyugg67z8E9O0MADwxGkgSCwbBm/mw11wjI9VNaWY0lo5RE70O7oy670V386D6 cBWd//6XWG9FAr4REUqB6ZgcNTaWU8e1ne+Sqq131/hu5qHvYDMIXhBFigmh1QKUljtP jCxzfLxHYOtwNE2/dh5NF6DRoU++Eb1T0J6dIa8vIW/j5PuokdZ6w0DeLehWm135W5He UiyMVdqNeo7ISp5WV/kXYbDNabBaavDVxIFmZBqANpZtumrTqG0bHS/cRh/78aSOl06d znvg== MIME-Version: 1.0 X-Received: by 10.140.95.179 with SMTP id i48mr72204196qge.4.1426496444106; Mon, 16 Mar 2015 02:00:44 -0700 (PDT) Received: by 10.96.39.195 with HTTP; Mon, 16 Mar 2015 02:00:43 -0700 (PDT) Received: by 10.96.39.195 with HTTP; Mon, 16 Mar 2015 02:00:43 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Mar 2015 20:00:43 +1100 Message-ID: To: Laruence Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c16dfcd3101a05116415e5 Subject: Re: [PHP-DEV] About declare(strict_types = 1) From: pierre.php@gmail.com (Pierre Joye) --001a11c16dfcd3101a05116415e5 Content-Type: text/plain; charset=UTF-8 Hi, On Mar 16, 2015 4:29 PM, "Xinchen Hui" wrote: > > Hey: > > The most unaccept feature in current STH thing(v.5.0) is this. > > acutaly, I believe in most applications, they will still keep this off.. > > so why we introduce such thing? > > beside this, I have a question, which is not explained in the RFC: > > lib.php > declare(strict_types = 1); > function add(int $a, int $b) { > } > ?> > > assuming lib.php is a thrid part library which I want to use it > in my project. > > but I use whole weak types in my project.. > > thus I simply call add by: > > > add($_GET['a'], $_GET['b']); //recoverable error since all > input in _GET _POST is string by default > > ?> > > that means, I need to add a lots of (int) while I try to call a > function in a library which is not written by myself. > > is that right? You got the answer but one thing bothers me a lot right now. How did you vote against this rfc while missing the core point of it (after actually having a strict mode)? --001a11c16dfcd3101a05116415e5--