Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124112 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 B0DAF1A009C for ; Sun, 30 Jun 2024 16:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719763826; bh=qCMC6nLlsoNrPFl3AYE8W98EZPL0Y1TIOH31rrruNGM=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=AMxDlXsUs1ddwXAkhvCrVO6a56a/ecfcL/JDrj5WR41Y5drUlIy5kQx14zYjCssRH wqrRHS9A5P0qaj+K1azvNaAOxkIMETYIkFg+URhQMqlXe2p9UBhfNIV8gNBpHWSvEd /4buWM58yRphtIdWNWZH1uakhLUVzSeOefd9BEe5cN7IptzK+ewe6Yn/e71WaHKYxz O9IOtsoVS1NgX5VUvPcnpgUi8AopGQffKm01mJ0x/iHoI4gpziN12TXbQtjFcoGE/6 ZgEuM6T4wp/PE2GHxHOdCwgsuz5IfdecgUq59IQnNeP1q7W8MJcsHAmhuykyosdr0K b4myayVkwLdHQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A38011805E7 for ; Sun, 30 Jun 2024 16:10:25 +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,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 fout5-smtp.messagingengine.com (fout5-smtp.messagingengine.com [103.168.172.148]) (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 16:10:25 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id A632B13800EE; Sun, 30 Jun 2024 12:09:04 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Sun, 30 Jun 2024 12:09:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc: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=fm3; t=1719763744; x= 1719850144; bh=qCMC6nLlsoNrPFl3AYE8W98EZPL0Y1TIOH31rrruNGM=; b=I AzofM7d+thJSdsjMMFxawWkENwtjfXeffF7o/d2s2snhVuoqPYIHoNgX3APNsW+j zZPkUuA1wVDSWUlZYmdxgJNyUiQ/lMH2UCTkV4YbAk2nY8X3MpXGzn96G5GSAErh G6APRbYuTVzZTFl0gMQhJb6LNp7gf+4CYFcmPcPuLjQ9prHTxh8nbohPUOaYY8oj KTXPxMgzLnG/Y97lpiGAT7S0zl+5+F06dSc3JmM/KL+yasNmj8KYaWd9kFUogJP9 FrgXZDcenD+8jaGS6LCREpWpcoFz4jP8DZzgIKkeht0+z8VSZqJ6ABAEqnn+phG4 YHjHF5M2REHwWmItThW9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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= fm2; t=1719763744; x=1719850144; bh=qCMC6nLlsoNrPFl3AYE8W98EZPL0 Y1TIOH31rrruNGM=; b=MopEkN3gBNkkfP1CmWW9x9JAKjK2nwTugpATpKOGbueP 0ZFeUXGH0Bw9em4JTHdE2XXiP6idQ/CehjUbNtCUs1Ntc5Po4WQ8omwPOo5XZ+1m lMXVlDgFd6hr6FybpLHuE9GGZj5BHg+8sJiAxXrYGPyezRf69FK6Y5kjRnbE1/Js kcvvsOA6FQdRAeilBGjhoPVi9+J5duOxS104TWRmb8u3DsW7J2Wc6oyndPUdvhqq Sz2QCvkuoeBhvbXDiHdrifs2oz3v2skjaBAHMjnKpMsAqh7pIm8dGW5Rtj7poZFI h6MytO8LLRFd3OtALt8dzixmXDfYJ8rnt6amPsN2Sw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddugdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreerjeenucfhrhhomhepfdftohgs ucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrg htthgvrhhnpedvheekteelveetfeevgeekgfffvdeuhfelveehvdetiefggedtfeejheet gffhueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hrohgssegsohhtthhlvggurdgtohguvghs X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id BC72A15A0092; Sun, 30 Jun 2024 12:09:03 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-538-g1508afaa2-fm-20240616.001-g1508afaa Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <0902ba2c-6247-4908-9264-c4fe533901f4@app.fastmail.com> In-Reply-To: References: <668168A7.4040005@adviesenzo.nl> <3B23E039-D90F-4F84-9ECE-C6A9A3E145AF@sakiot.com> <870bb837-400c-4a86-ab49-2ffef9d80ce7@app.fastmail.com> Date: Sun, 30 Jun 2024 18:08:43 +0200 To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , "Saki Takamachi" Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] [Discussion] Add bcdivmod to BCMath Content-Type: multipart/alternative; boundary=8d33dade9f1844d9ada1a3497de0aa04 From: rob@bottled.codes ("Rob Landers") --8d33dade9f1844d9ada1a3497de0aa04 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, Jun 30, 2024, at 17:45, Tim D=C3=BCsterhus wrote: > Hi >=20 > On 6/30/24 17:31, Rob Landers wrote: > > - list() -- kinda >=20 > That is not a function. >=20 > > - array_shift(), array_pop(), etc. >=20 > These do not return by out-parameter. These return the value and modif= y=20 > the array by reference to remove the returned value. >=20 > > - preg_match*() >=20 > These only return supplementary data by an out-parameter. The main=20 > result ("does the RFC match") is returned regularly. >=20 > > - all the sorts > >=20 > These do not return anything, they modify the array in-place, which is=20 > something different than returning something. >=20 > Best regards > Tim D=C3=BCsterhus >=20 We can argue the semantics of input/output, but the point still stands t= hat return by reference is still more common than structured array, and = even then, those are usually much bigger things. =E2=80=94 Rob --8d33dade9f1844d9ada1a3497de0aa04 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Sun, Jun 30,= 2024, at 17:45, Tim D=C3=BCsterhus wrote:
Hi

On 6/30/= 24 17:31, Rob Landers wrote:
> - list() -- kinda

That is not a function.

<= div>> - array_shift(), array_pop(), etc.

These do not return by out-parameter. These return the value and modify=  
the array by reference to remove the returned value= .

> - preg_match*()

These only return supplementary data by an out-parameter. The m= ain 
result ("does the RFC match") is returned regula= rly.

> - all the sorts
>= ; 
These do not return anything, they modify the arra= y in-place, which is 
something different than return= ing something.

Best regards
T= im D=C3=BCsterhus


We can argue the semantics of input/output, but the point still stand= s that return by reference is still more common than structured array, a= nd even then, those are usually much bigger things.

=
=E2=80=94 Rob
--8d33dade9f1844d9ada1a3497de0aa04--