Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122594 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 19B5E1AD8F6 for ; Sat, 9 Mar 2024 16:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1710000058; bh=mA9ZQ0PplJf4rpjkC3ydebZ0EJslgvcSXp3k97opA/A=; h=In-Reply-To:References:Date:From:To:Subject:From; b=M2mK5Md30kDGR2l2g2+VjloaV1Iq60VldxdltJGQ5J+EJsBI481S6WKlDxU5qol4c xx2Ja7qMXsKMWzG9rqD6+Bf9ZH9pn8pBUS5QiSyP31ic4eMpi8hOyB0pdqQIJyxBdH gbCh8DN/sriEbE26hPUeXS4eUbpQn4D2FUG55sc8t9KBikYjuVuGQymJuTJ/cJUBPi DLVbCVmlgLQSjLkcLUGRP8GcHV+nRDADtMdmPAOW6+uvOoiYc59rGLn98Mp4lFd/tK 90qeTtbDdcfXHafXd4V5pkp5A2Kn7tDVacIa9qDECBoa1/fUCkZJVTMpbhS7sHZqUl 4orgCjxWisjHA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 54332180069 for ; Sat, 9 Mar 2024 16:00:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 9 Mar 2024 16:00:56 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E27135C0045 for ; Sat, 9 Mar 2024 11:00:41 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Sat, 09 Mar 2024 11:00:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1710000041; x= 1710086441; bh=4YfIMIVlQUSIizlSoZidpMqX/Fri+/ctmyxThHW4llo=; b=n SsCn4F+zWf2If5KXZ3FuBVbpszUK7V4zcx7V0+qEnac2IwNuqLlOV6ZoTBRW0uZQ XH+IJY3WdOlstKgwPEbNbqu1IjAL8LGmMu3yXaQ8oR+fs9PrJR9Qo3xgoFZno/r8 zAQB7ffcQh9QTqtjO4CJYspvnGbUzsgfnkgyxNnz5pmNSd5j/7nAvL63p/+jgnDt tbAvSvJZC3bw9Olaunwj/cXWGqlMQEK0WvOTu6bdGehyklZ+RRQwxB7t2/sKxKBg OBMX4y0Rg9ix6EsCPc17chT0fyhCmZEB44oqp8awb2s6Jc4t3Ll5Me01wygzjoB7 TKD+gXByjhmZqB2YaCLOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1710000041; x=1710086441; bh=4YfIMIVlQUSIizlSoZidpMqX/Fri +/ctmyxThHW4llo=; b=EMUF5aTffderBBMfteiY7cW36hCrEtUGrXlFydJZ062v r50YpU5V8PDIctZYNPhRfRFA6h6dIInaHYoTi7kEHIYGgzbFaR8ITnn71AKHMYhd +c01hdxwd89NLOyoOopgcZgLVlCulgxWu+L57fHkCFq3PmDzupamM4uR7+2g5PT6 Rmyn9HXL7DaCpaAgdEw1qlgq4ohZxpfX3Skv+C29D0cl8Hn+Kf8qGiq6XyVK38gR U/Z1UlSA0EU+5l4KhjkdfiPxfcUXVLEOMQWMxasC5dWIO5Y2IHCMa99bH5ttpIRj 3eZFyLKRbOG59JIzrFEUOPuWDJ0msC4d5aJ1hkXpVg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieejgdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefgffek udevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A1CAD1700093; Sat, 9 Mar 2024 11:00:41 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-251-g8332da0bf6-fm-20240305.001-g8332da0b Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <73b032ec-b41a-4b96-8254-f0b68abf87f2@app.fastmail.com> In-Reply-To: <8a96a374-eaf8-4ac6-b45c-61d2a0c9652f@mabe.berlin> References: <07407c20-09ea-4bb9-a5cf-3af41b9234ee@mabe.berlin> <8a96a374-eaf8-4ac6-b45c-61d2a0c9652f@mabe.berlin> Date: Sat, 09 Mar 2024 10:00:21 -0600 To: "php internals" Subject: Re: [PHP-DEV] [RFC] [Discussion] Rounding Integers as int Content-Type: text/plain From: larry@garfieldtech.com ("Larry Garfield") On Sat, Mar 9, 2024, at 1:01 AM, Marc wrote: > Hi internals, > > Just want to resent this note about the updated RFC as there where no > comments last time and I'm unsure if this was due to mailing list issues. > > I now have updated the RFC to allow to opt-in to new behavior on PHP 8.4 > and be able to opt-out to previous behavior in PHP 9.0 via new parameter > "force_float". > > Also the deprecation has been removed as nobody liked it. > > If no further comments arrive I'll like to start voting next week Friday. > > Best regards, > Marc I am still opposed to this. Logically, ceil/float/round should be returning ints, not floats. Only returning ints if it was given an int is, er, kinda pointless, as you'll just get back the value you passed in. (Because it's already rounded/floored, etc.) So this doesn't get us any new type safety, but does make the return type less consistent than it is today. That's a step backwards. If there's some math reason that we cannot have those functions return int (someone mentioned there was, but I don't really understand it and the RFC does not explain it at all), then we should at least keep consistency in the return type. "Sometimes I have to cast the return value before I can actually use it in the obvious way, sometimes I don't" is not a good situation. --Larry Garfield