Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101856 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83480 invoked from network); 12 Feb 2018 23:37:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2018 23:37:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=pslacerda@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pslacerda@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.49 as permitted sender) X-PHP-List-Original-Sender: pslacerda@gmail.com X-Host-Fingerprint: 209.85.218.49 mail-oi0-f49.google.com Received: from [209.85.218.49] ([209.85.218.49:39030] helo=mail-oi0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/08-26725-055228A5 for ; Mon, 12 Feb 2018 18:37:53 -0500 Received: by mail-oi0-f49.google.com with SMTP id j188so12522645oib.6 for ; Mon, 12 Feb 2018 15:37:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=Hp8ArxlUHvFQtvwIkrS/fOhbv6YiN9I6aS7guTphlo0=; b=KkJ3YVquzOMyRDm4Ku4c+vhhtqRqY3Xx45wTov0zl0IqXwlatL5+AHBcrWT8oDniYP mMI5mLthKB0Yzv7TYaxTYBLXySrffMgp9S4URNswZQJUYRFt/MXuoauWKAnODypNGuYx 8bvb30J8SKSBGW9cj7aBXWX2WNIDB5+RoHvcgDwbZYXeBMScdbjHqb439srOjkP/5H9/ MJy70cDsjY3FAcHV1/li5xTIE3CTR7DKseZyw+r3cRqlR1t36oKlj2MiN5f1liaSpKTk xQFoFyLO5y8KEovwG00D3OZ8CrVbQjpJf87KH1y10EwfveHOhPD7xZcr5Yj8IkcdbWtC Qz6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=Hp8ArxlUHvFQtvwIkrS/fOhbv6YiN9I6aS7guTphlo0=; b=nIb70nU4smSaocz66f0HxCv8FzzEWYH1YRW7SgQ9FBDGd8cxwFZIhmQeZpur3ZEppx B84O6CnLv+9l7qUf5R8rFmstibWj1rtwNyI0iWkZZrXWawP9zsHfDMiJEjqYJvF0KknZ hAg0ZkT2jLEAYzmalqw4n4kokd2QWVM6+yvhPLjbZzkXW08i0QS5kcl0xXtQ9kGTCk8y KusLntrD56LCHJ4vTp05KZVWywwg2t/YRPhhjxaRonW7R7luRbn87MxocusyKaodNqHV +JyOkBmB9RlC4zdomXmuZqovds3O1umo1dvF+opeu0N1i72jCddTo0v4Ing9XxHKGFr7 zLxg== X-Gm-Message-State: APf1xPC7aiZRm0C0T0WWLUfKO/qpxTqZl/zEjuliPyaIGS9lS94nF5VV TQEVMEUj7pfYtcH/BVEcLuQYdRU8l0/FnpAs/76grA== X-Google-Smtp-Source: AH8x227C8BU02ZKGxTBn3zXx4Vb4uhvSwFgPW9Peu50AymYJMgFmrPMIVFKM9gIdzlf/qKl55ndJNQDLs5d7z956CGA= X-Received: by 10.202.172.66 with SMTP id v63mr8150745oie.255.1518478669493; Mon, 12 Feb 2018 15:37:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.7.195 with HTTP; Mon, 12 Feb 2018 15:37:29 -0800 (PST) In-Reply-To: <5F370154-82E6-4451-A344-B48BF21A0208@gmail.com> References: <5b21571e-722f-43e4-5c9c-4def39447e1e@gmail.com> <5F370154-82E6-4451-A344-B48BF21A0208@gmail.com> Date: Mon, 12 Feb 2018 20:37:29 -0300 Message-ID: Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="001a113ced86b1be9f05650c5d27" Subject: Re: [PHP-DEV] Proposal to run all tests with and without strict_types enabled From: pslacerda@gmail.com (Pedro Lacerda) --001a113ced86b1be9f05650c5d27 Content-Type: text/plain; charset="UTF-8" 2018-02-12 18:05 GMT-03:00 Rowan Collins : > > I think adding this to the language would be very controversial, because > it opens up the ability to undermine the "caller decides" concept of the > two scalar type modes. People on this list have openly said that they would > like to force users to call their library from strict mode, and others > (myself included) would rather that wasn't possible. On the other hand, > there were a handful of cases suggested where such an indicator would be > useful to *emulate* the two modes in functions with more complex signatures. The current beharviour makes sense to me, if the caller don't know the concept of strict types he must not be forced to handle it. I don't know such examples where would be useful the callee emulate both signatures, can you provide some? Something like correctly cast to the correct type? That can make sense. But restrict the caller doesn't seems very valuable. For testing purposes, it would presumably be enough for run-tests.php > itself to expose whether the strict types override was in effect, which > would sidestep the wider issue. > Expose only through `run-tests.php` is safer for sure, it will not be highlighted like other constants because `zend_highlight.c` wasn't modified but whatever, it's only for tests. -- Atenciosamente, Pedro Lacerda --001a113ced86b1be9f05650c5d27--