Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124097 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 03CD11ADD0A for ; Sun, 30 Jun 2024 14:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719757066; bh=Q9dJNlSqiX7ZiqgiBUiqi9xn6Gr+sUDczhyyZLRtG5M=; h=Subject:To:References:From:Date:In-Reply-To:From; b=MVSb1noHCY41IiyjrbMCU2f1IT+ZZdEhbovZei+ElSqNqrstKbsT/9SSv/3KwX8EQ wuO6xn5z9+hbPkcOeVTsMfnmOnsJgzCgv5PG+Xw7FWITkpPhRyP2Kjwq2poELgB6kh krHb44EkCA4i2xl9crD1tDhgvDZn1Aqn9FzTgpLdcnXbJCqJJ37TOvsSbtX8fa/9VT AW6AIyc3tUEONzTSlvJYHm4tEakdGURrgh7PiBv/J9tGiHLlvnGLZw4L4dqDgg+H4x lc3PN3SAR6TGNYKZx5hBwiA8oK/14QnowSEYVRCicdh7VthI/gtx5d8hQxtICRRzud vQHMfJ38XpBmQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AF8BA180C79 for ; Sun, 30 Jun 2024 14:17:44 +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.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_05, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_SOFTFAIL,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 sienna.cherry.relay.mailchannels.net (sienna.cherry.relay.mailchannels.net [23.83.223.165]) (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 ; Sun, 30 Jun 2024 14:17:41 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AA538C2F6F for ; Sun, 30 Jun 2024 14:16:20 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 27707C384E for ; Sun, 30 Jun 2024 14:16:18 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1719756979; a=rsa-sha256; cv=none; b=mEOPwMZYCUJ7eQcdi5fflHxhKAZlf2p3Hhh4xuQfHKGGmrQpeQav4UtiIyd+0gP5tPe+jB STkWF4x/wwMud+B1Wf4CLE+mBjz5ZVwAsTuTgjDbU+99kvmsS7c0zLkpc7bYG1YuwR2izH wtc/NlIWqAgvkeECpy9x4KrBcHapXzSqlicHfv4GyNTPs+9jlkduz+4AbTqiGmrVnwlcZG Efn81VTMs5G+tKXg3BqN26MfG1BL/ev8bQj6JBKb+vW4ZR3chaEgCrC5th8WTx4mvO0Mh7 PVWR/vPaqzoKtzXVSwIAfVh0QIDywGTo6Kv2i7X5rS6JIrBEPZ6cjFtkUinYDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1719756979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qIg3GiBr5yFfSWsnpkaZ4r8yduj4hGr0LDYxpF6vxEw=; b=xZMDmcaiy7i3qcceObpOgF6E5Lnub6EDVfrgm2VfaFX5LaVAc/ovUmZgGd1/ex7hAM72/4 WRPx4kXhcjJq8ezQOWHVJ8rNo3YBZnOdSdARZfgxihEMlbvPcbNj5Sd8U8ngzSnhY6Gu4U xaf+gy4OfNvEiH891MA+uwwDjYu337Ycdul1LuLXGiwo+A/AOF9iJ6DTi5tUEwR21wrc76 HNkVvDBMb6VyyA/N5EOMGuWLpZ0nKlblW6mZ6pYSl3rMU9g2rrUjjHY09hVXzC0Y7VKCVh BtPur0T72lkNyMuVl/O0K8gcrHcT5ouRFxJHkcNSkRz6C2LUtmb/oVrGiyyfjQ== ARC-Authentication-Results: i=1; rspamd-79677bdb95-skh56; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Stretch-Gusty: 3f4afcc051fb70ed_1719756979982_4081549588 X-MC-Loop-Signature: 1719756979982:3346756374 X-MC-Ingress-Time: 1719756979982 Received: from nl1-ss105.a2hosting.com (nl1-ss105.a2hosting.com [85.187.142.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.109.88.204 (trex/6.9.2); Sun, 30 Jun 2024 14:16:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qIg3GiBr5yFfSWsnpkaZ4r8yduj4hGr0LDYxpF6vxEw=; b=Ri7CX7IG/Qa48UUSFPgdnuVJzI mXQVKa7c6fG7fWBPwGa4XiTjAr1JhJLD347Gj7Y2VN43DqJwmBi0a5SyTwPpKHNCbIDF+HtO0u933 IRnO8epxJDDa2CRjYRtvx2q//MwFCULJwua60E3kjchhHo2LtamIQ20XfXigXgU0Zik0=; Received: from [31.201.40.213] (port=58863 helo=[192.168.1.16]) by nl1-ss105.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.97.1) (envelope-from ) id 1sNvLj-00000003KaK-37kz for internals@lists.php.net; Sun, 30 Jun 2024 16:16:15 +0200 Subject: Re: [PHP-DEV] [RFC] [Discussion] Add bcdivmod to BCMath To: internals@lists.php.net References: Message-ID: <668168A7.4040005@adviesenzo.nl> Date: Sun, 30 Jun 2024 16:16:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------000602060009090308090408" X-AuthUser: juliette@adviesenzo.nl From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) This is a multi-part message in MIME format. --------------000602060009090308090408 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 30-6-2024 16:04, Saki Takamachi wrote: > Hi internals, > > I created an RFC and put it in discussion status. > https://wiki.php.net/rfc/add_bcdivmod_to_bcmath > > I expect return values ​​will probably be the main topic of discussion. > > Regards, > > Saki Just a suggestion: what about making the returned array an associative array ? Like so: ``` array( 'quotient' => 61, 'remainder' => 1, ); ``` This would remove the need for devs to remember the order of the return values and would make the return value self-documenting. --------------000602060009090308090408 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 30-6-2024 16:04, Saki Takamachi wrote:
Hi internals,

I created an RFC and put it in discussion status.
https://wiki.php.net/rfc/add_bcdivmod_to_bcmath

I expect return values ​​will probably be the main topic of discussion.

Regards,

Saki

Just a suggestion: what about making the returned array an associative array ? Like so:
```
array(
    'quotient' => 61,
    'remainder' => 1,
);
```

This would remove the need for devs to remember the order of the return values and would make the return value self-documenting.
--------------000602060009090308090408--