Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124275 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 B9DDF1A009C for ; Mon, 8 Jul 2024 04:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720413054; bh=fsKxy/BOpOSJuI8QGmopbgS+MsgW7bsQxx6EXgOl1wk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ak43beDrooE0k4Q35/gtmsSdc4h36URAlur9cCCjUFsWwUceUccMmTZ0fmtFyFOL5 oo0vl8hkTAOg8xmyuwBP4nf90YQmbCnkFDd9yfGtVQcjQRua99lIvuH30zJPR4V3mh tUnC5FgP3ztxw1ffkxT0xksNpchV33fW6DgZgDo1IzBfJ4HU3w+D/hYxMO+XFlAB1x bXU3FQiH3uKDaxgbYvmZEVIXbHwgnPZudr4MjnJZlBurodTTj75DNiODo4VwyIZ9ec Evp0w0GZf4LO+bzzW8Fq08fq5hVvu0GEpCXMaNWn5v/0khD+y5p9mwzqL8SBPEypC9 RSKlyI7zdvKyQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 97E38180A1C for ; Mon, 8 Jul 2024 04:30:53 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (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 ; Mon, 8 Jul 2024 04:30:52 +0000 (UTC) Received: from smtpclient.apple (unknown [117.55.37.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 725084011B; Mon, 8 Jul 2024 13:29:25 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1720412965; bh=fsKxy/BOpOSJuI8QGmopbgS+MsgW7bsQxx6EXgOl1wk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=to/xknWQeRdZz6mHBFZLym9FsuzBbXKjpeHslPigbMZ6Sqlb8kjbjdi8cXCX9xZru TG+Jb3oNAln8u5aX6Ixtu6jzTGXPx1/bWVjUl5QXbp1i2f9yaPaQnHA+JetVi0q8gH BDAMbVT/hMAsUn89dFVs1i6Rdyvpi2fI/IGJXhNw= Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: [PHP-DEV] [RFC] [Discussion] Allow int type argument to BCMath function In-Reply-To: <668B6428.9030705@adviesenzo.nl> Date: Mon, 8 Jul 2024 13:29:13 +0900 Cc: php internals Content-Transfer-Encoding: quoted-printable Message-ID: <3DF46B77-530C-4CC7-8BFF-8B3DC2232EE2@sakiot.com> References: <668B4C78.2000808@adviesenzo.nl> <8FA0DE3B-2AF4-4110-9836-14E035DC8169@sakiot.com> <668B6428.9030705@adviesenzo.nl> To: Juliette Reinders Folmer X-Mailer: Apple Mail (2.3774.600.62) From: saki@sakiot.com (Saki Takamachi) Hi Juliette, > I honestly don't understand what you are saying here. >=20 > If 0.285 is a string, then no type conversion would be needed to pass = it to BCMath anyhow. > Otherwise, 0.285 would be a floating point number already. >=20 > If the type for BCMath would become `int|string`, in non-strict mode, = there would be quite a significant change in behaviour for the BCMath = functions as passing the _float_ 0.285 would previously result in the = string "0.285" being passed to the BCMath function, but would now result = in the integer 0 being passed. >=20 > I think this BC-break will need to be called out as it is not = mentioned in the RFC. > I also think this BC-break should be enough reason not to accept the = RFC. I had overlooked the priority order of Union type casts, thank you. I don't think a satisfactory specification will be decided on this = before the feature freeze, so I will not rush into discussing this RFC = for now. Of course, no voting will take place until the specifications = are decided. If we were to discuss this change again, it would be in = versions beyond 8.4. Regards, Saki=