Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113384 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88688 invoked from network); 4 Mar 2021 17:58:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Mar 2021 17:58:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CE4B31804B8 for ; Thu, 4 Mar 2021 09:49:16 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 4 Mar 2021 09:49:16 -0800 (PST) Received: by mail-ej1-f41.google.com with SMTP id dx17so23491619ejb.2 for ; Thu, 04 Mar 2021 09:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ll8LiwLGQV/VU2zrjSOS2A9JFfw1h6HqobYFno7ikdc=; b=mhK+Za2FkKfypoDw4+aLRSpgx/AdLrfBGropHsIVACumnw6StD0d2u/n+WVqM9OaWF 0FIYo15Ls5V9punbp4+suF51oT/h3s4DkAXxJZ2wKIq/94D67l5jvj5FfbJAzKROhevF YLYFv7SaSNPw4Y1aiVAd/je59XFh33tpAjcf8CypJ7ajbCbd5Nc5WVmYFVvMDcJUGvIt 20Pfaw+6cGlweMSCFvKSqLftf1w17PME91nnZvkx1VpgYBHYzGhK9GdN+BqfYHmziy2n YE5FdJFMMKRXUTTyY8HbqyFWfEt36Rx40C3y37eI7NtviIFrdTGxyJQvowbD8NycWFVR p1CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ll8LiwLGQV/VU2zrjSOS2A9JFfw1h6HqobYFno7ikdc=; b=AobUscVg0JoAOsqB5gxzlB4L0j3zUWEHbE38flAjQGBEnXfxp40a9ztZpGNtQN8bez DXc7N2fe8rNoxqu1yiNMvOra+Jx9tX3gy3PfSxffV0UspkpzhDDYT3d2WuPO0AkJcALf qCj16luIW9xCyTkTViju18o8oJHe5S6ZtMb0L3zCIUFLV6eu/oAUq7t0GEfBHvj75njK vZXEnnr3fj/7GTO4hxwwCu34X7HJg1CCca5w2oT4hVyOR1OY1wmLsMiCacwA0At+n9/3 Fol0VdsgFGMoTY6cgYjh4k1fVyO329ECmsCq1Wte+2Gg0BsQwJKa76jP3uDCXlgB4qN8 T8yg== X-Gm-Message-State: AOAM531ZAsUUjSGGxeB6GfohgbKawmuj5mPqahbQW+FyTh+KBcRCUElp FWymZDoZLxRh05bd/Ln3xRuQ4tjktDm57LtOh2I= X-Google-Smtp-Source: ABdhPJwq/8gHzYQ9FGg7qfK47K57Z9QM16IbYImrd/U35vAcdqYe/vBI2Hs0eqG/0c3fHYUb2XI9lWSlcOprFbE1G5g= X-Received: by 2002:a17:906:fa0e:: with SMTP id lo14mr5484397ejb.263.1614880153813; Thu, 04 Mar 2021 09:49:13 -0800 (PST) MIME-Version: 1.0 References: <31987585-0286-1e0a-adcb-51d2edec0145@gmx.net> In-Reply-To: <31987585-0286-1e0a-adcb-51d2edec0145@gmx.net> Date: Thu, 4 Mar 2021 17:49:03 +0000 Message-ID: To: Andreas Leathley Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000ec44fa05bcb9959c" Subject: Re: [PHP-DEV] [RFC] Deprecate implicit non-integer-compatible float to int conversions From: george.banyard@gmail.com ("G. P. B.") --000000000000ec44fa05bcb9959c Content-Type: text/plain; charset="UTF-8" On Thu, 4 Mar 2021 at 13:23, Andreas Leathley wrote: > On 04.03.21 14:07, G. P. B. wrote: > > This new version of the RFC can be found on the wiki: [2] > > https://wiki.php.net/rfc/implicit-float-int-deprecate > > I like the RFC, but I think the diagnostic messages will be hard to > understand when they come up in real scripts, especially because they > can be platform-dependent and can have two different reasons, and > "non-compatible" is not self-explanatory. Giving a very specific message > would be more helpful for people experiencing these errors, something like: > > * Implicit conversion to int from float(-string) with fractional part > * Implicit conversion to int from float(-string) which is outside of > int range (=> maybe also mentioning the range of the platform) > > (Maybe there are additional possible errors to consider, but those two > seem two obvious possibilities) > The other cases would be converting from infinity (+ or -) or a NaN value. But having specific messages is a reasonable enhancement but does make the implementation more complicated as one needs to determine what is causing the incompatibility. I'll have a think about this. Best, George P. Banyard --000000000000ec44fa05bcb9959c--