Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113367 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 42469 invoked from network); 4 Mar 2021 11:55:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Mar 2021 11:55:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 852791804B4 for ; Thu, 4 Mar 2021 03:45:48 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.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 03:45:47 -0800 (PST) Received: by mail-ed1-f41.google.com with SMTP id b13so25198400edx.1 for ; Thu, 04 Mar 2021 03:45:47 -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=pJPHhj/IJoDEmiA+jmziAUSXr9iA3touw2k9QeAArL8=; b=a4kHxhze6AcwWiXC+n4Gsbwp8h9NPNEpYxBTXfEcNa/FDhk7yYVYcRyt0JMzSa7FzF hUhnCSQOHY35GRnmZ3uiO7U3wGEZDLcYDS2NWpelsNkPiARRFojQb0HFZ49ZSUgKl1oj W/AmjdHpfCItg6C1xUpHZhGccVWe8sK37kWAiUfgISisPaqGYB84FNeMHrBQhDYt311C lag6vF+UVZzgBIAtHSJbH+ynqpY9cLUvobiHBmWgwNFes+1booP+FrP32FTgzEKdLY3h abEnBcUZ0poPQpbXE9QhvzencRPA+ZPYv4bvsJfaIPtj7/C1U5EgJ00Q3AssvSmfEYdb 7UHA== 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=pJPHhj/IJoDEmiA+jmziAUSXr9iA3touw2k9QeAArL8=; b=SQfzEyx8BsRVur8KLmMG+u/sYorJz46J0gYo+W6Z6lH8cuBCMkkCxq6rlm3ICnbJPv bp1fBaxiM6CHBUvxO90Lc9SogzUjTEqM7aXB+BC9DJzNZb60zBwpwxjpjKKgVq+Ggzji CxuROhQHtxYIZm/cLJhYaJ/P4ouOV3VUl1pNGalh7uCwpwG1nGOx/+I81HigOq2RBvlC RpYXPXOXMpTDjl0qman7xPvWRI2xGSf2nh8ymKqai8BgI6c62En9IEqc4BX62ZyK4CTF 7DBd7pfzbdOOcofg+lyi49I/nyejxi5Otn/dzn28SgPwq6PmPipRt2kz90WORSNESUO6 zp1g== X-Gm-Message-State: AOAM530JF4tmcJWO7drc9kOMwSHvJBopfeBrIMRk2xKYR38P5Exp5UgN ZPV+JiDdixY9gicjOxG4pv9Gwr7bsHVEaBG7Vn0= X-Google-Smtp-Source: ABdhPJxBDpOuLh5vpea+wf17Hq94RwEfqAkGClRM8lD09y52+0Eszu/o5b0xrMWmQirCwTci4pcZDPiM3YeblBsEubE= X-Received: by 2002:a05:6402:3590:: with SMTP id y16mr3875488edc.21.1614858346830; Thu, 04 Mar 2021 03:45:46 -0800 (PST) MIME-Version: 1.0 References: <424A5E98-2110-4AFE-9C53-8636A6140313@benramsey.com> In-Reply-To: Date: Thu, 4 Mar 2021 11:45:36 +0000 Message-ID: To: Nikita Popov Cc: Christian Schneider , PHP internals Content-Type: multipart/alternative; boundary="000000000000201ec905bcb48214" Subject: Re: [PHP-DEV] Don't compare zero exponentials in strings as equal From: tekiela246@gmail.com (Kamil Tekiela) --000000000000201ec905bcb48214 Content-Type: text/plain; charset="UTF-8" I actually do a lot of lexicographical comparison with ISO8601 date strings. I also have numerical string comparisons, but the truth is I didn't think they would be cast to integers so that is a potential bug in my code. When I use < on strings I expect that they will both compare as strings. In other places, I explicitly cast one or both operands to integers or float. I do see the problem that many people could use < and > on strings expecting numerical comparison, but I believe most people expect lexicographical comparison like me. --000000000000201ec905bcb48214--