Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121231 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52145 invoked from network); 5 Oct 2023 12:12:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Oct 2023 12:12:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DE15318050B for ; Thu, 5 Oct 2023 05:12:55 -0700 (PDT) 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,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 5 Oct 2023 05:12:55 -0700 (PDT) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-277550774e5so616342a91.3 for ; Thu, 05 Oct 2023 05:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696507974; x=1697112774; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1aMUcw5NaTzmeGbAs67PmfIjJac99+7oP6gaIS5MQfE=; b=IshX9ZK9Ev+RLyzZaomygp4zIz4qoe0xaQMg5sfPHFFaVsknPJ+9jkPdm50UV6YvsF pjAj3l7B5o6vPhXetY7g1B2gtRuFGT3tUEsEkJUMvDJrF7SsgJdsG9WkJrA6NUWa/ZqS wEXDt73JHJk7zpCMfwnOMRvt8Zu0gkyUIyJK2upAfqCOg1p4bfuBwrndq9KzdGk+uVlq aPv0JxJMe8f7+dmbzuzWeypvH9w2IL+vR+3rDjAkCz2q79xyj5x/xBBqT3Umm5XaGLV0 1OTfx4y6xrPilSqyHZIF8BKu7iJ/GVj4m9lZ+QHNZiaRtKtFiFUk0axbiF7XvAjibgOi sE4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696507974; x=1697112774; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1aMUcw5NaTzmeGbAs67PmfIjJac99+7oP6gaIS5MQfE=; b=ODiAe2KbCeYGxK76o4G0qJIi8OvHuk2/t1LyjfTVmFdd/+D76Cx7ZwISj98a9ajqcq cYnzGjfdI3B3nu1nbJZAljyqDv/aF62DtBDYtgkH1Wq2Xs/PjeXHQC/5h7ffTPrfN1w1 B96kGJSOTA88+xyGGuH/Vuh+YgSiCWe23V8fJWfZoWGXT6uXuOqclYRko3KBR+jB1388 fU2IzUF77ttcUFwO8Sshwi0UT947ipyix6UKvt1P2XhDQNBl7y+r/SI/rY1uPtOrGEzl Ep46SO7idRRYJUJV50gFlY7/uXzGW1bd91FF2d0Nj50DP6lP10Ij4vTwz5d0yo7QkngM ofog== X-Gm-Message-State: AOJu0YzBDj+jncYC7DVq1PoEELQXz+DtzLNGtWa4yxDi/L2glklAq3Cj TO8JZRr04w1snCmZaLh1v0e4pOLKtFDWH4xKVfTwTC9axmJkNQ== X-Google-Smtp-Source: AGHT+IHW+Vsju3WdzqT6et/+dPAY+pILTM2wwKhKTLoL7VnCzDjuTDN89x9ktfuTatC7wzEOl00p55KoZjVlR1MOXrM= X-Received: by 2002:a17:90a:e98c:b0:268:414c:ff3 with SMTP id v12-20020a17090ae98c00b00268414c0ff3mr4885635pjy.23.1696507974045; Thu, 05 Oct 2023 05:12:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 5 Oct 2023 13:12:42 +0100 Message-ID: To: Marc Bennewitz Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000026d5a20606f70bff" Subject: Re: [PHP-DEV] [RFC] [Discussion] Rounding Integers as int From: george.banyard@gmail.com ("G. P. B.") --00000000000026d5a20606f70bff Content-Type: text/plain; charset="UTF-8" On Thu, 5 Oct 2023 at 07:40, Marc Bennewitz wrote: > I don't see a bug or broken behavior here as these functions were > processing floating point numbers since .... forever. > > https://3v4l.org/PrrmO > That's not my point, the point is about the function being broken for large 64bit integers, which your RFC is fixing. I would also expect most people that actually use ceil/floor/round to dump the return value of it into a property/value that is expected to be an int. Which is also compatible for floats that fit in an int (and since 8.2 for those that have a fractional part a warning is emitted). I see no benefit in doing this weird approach instead of just changing the behaviour. Yes this is a theoretical BC break [1], but unless you can show me an actual use case that breaks (and even then) I don't think the approach of this RFC is good. Best regards, George P. Banyard [1] And this is coming from me, who does love finding weird edge cases and remove them from the language, just look at the 8.3 range() RFC --00000000000026d5a20606f70bff--