Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96030 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77411 invoked from network); 19 Sep 2016 23:21:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2016 23:21:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.213.54 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.213.54 mail-vk0-f54.google.com Received: from [209.85.213.54] ([209.85.213.54:35727] helo=mail-vk0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/4E-19521-BD270E75 for ; Mon, 19 Sep 2016 19:21:00 -0400 Received: by mail-vk0-f54.google.com with SMTP id g9so461682vkg.2 for ; Mon, 19 Sep 2016 16:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=k0nKKz+CjCSQVKsODiiGoXxUw1BtqWIOY3N9KtxoPrc=; b=HhgOV40DIs7ZPS4oGILFiGHxqSYkGaAvrI6HlqFmtBt9OnrMHmXtSXraJpmIqGNJVn RIfNrDsOMShjiFchmgoHUPfmRd0bM9KSl0hIj3+T72niX6IVJ4988xa067WJb7wK8ibe Bm6NJ7P47lKUCYWZGe59/3DzKSw9On5te+EL0ajxed8jeW33ZWFXOeUDUZtHErf9ej0r tXN4jq+ECPoZZgk8DwUnT98758CzZ0UDjf6KzAYQH+13SkIVRXR8yXcQIxH0icpE3LVY FttzUF/uhQv6Jbcae6/tgsCZLXErs55wcjKkJgLIAtL4NGuB8g8RE3p0aoktts46Clyo /RIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=k0nKKz+CjCSQVKsODiiGoXxUw1BtqWIOY3N9KtxoPrc=; b=JtryURriMwwbqdgOSZaywHvkg/2VQdkTYqCLxMqAO1vjiaaQ79xYMeqqrrA0V+4/zW HxLR/q0cKrMgolGX4UpkpkZaEoBccx9iyZHw8+0gsdHFB9o5PUFo8L3anbK8IBG49fuJ Rk7fIhB483YpCA8QAKvi8diWWfTpuWoRgPaKW3xE92o923u/O99jXXNMRgbiqdqgQCAs vlWuwtYaiYmOraF6BeKY773L0vU9gf+0tUaYDtBe8LdDHQ2ASyfUBuJP0IWylAHkm9iS Yni++uqhHhJDBmdJSnlfWZKWXL8uP3rxoUMn4aV299r/WQ4DfZGaNAk6ZRmo8KBM7yz+ SBTg== X-Gm-Message-State: AE9vXwN/PNqOtKIdL5gAnxGrmWbM4isSG4lN+x6voTtX+uEWouHwdsNFNUtPDVI4ybjY5EG3FFB8lKSXoegsqg== X-Received: by 10.31.125.65 with SMTP id y62mr1563919vkc.5.1474327257056; Mon, 19 Sep 2016 16:20:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.69.4 with HTTP; Mon, 19 Sep 2016 16:20:56 -0700 (PDT) X-Originating-IP: [78.149.6.246] In-Reply-To: References: Date: Tue, 20 Sep 2016 00:20:56 +0100 Message-ID: To: Vesa Kaihlavirta Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: Strict comparisons From: danack@basereality.com (Dan Ackroyd) Hi Vesa, On 19 September 2016 at 14:04, Vesa Kaihlavirta wrote: > > My idea is to add a strict_comparisons declaration that you can add at the > beginning of a file in the same way as strict_types. > > Please take a look and let me know if this would be worth a more official > RFC. I think it deserves an RFC. One thing that might make people hesitant about this, is that it's likely that you would want to have the occasional weak comparison in a file. However that should mostly covered by just adding a cast where needed presumably? e.g. like: $foo = '5 apples'; if ((int)$foo == 5) { echo "eh, close enough"; } cheers Dan