Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:125881
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 517C31A00BD
	for <internals@lists.php.net>; Wed, 30 Oct 2024 12:42:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail;
	t=1730292270; bh=d3MVLn2l1rI7FUH0BNaBfj1EPls2IbMVpS9nU/B8qbo=;
	h=Date:Subject:To:References:From:In-Reply-To:From;
	b=YXU2iAFjvrtNxK2j99VPAnuyByYyTxiqlLGJ9fr4Rrx09vxUHqTuUA/+RQe3RhJ0f
	 QGHg4DMt2eXkD9dkSUruVLniOkrKVMZPdwsmXmtYL6RLbK6rRf4J5PC91Papl+b66/
	 6qnFvL3+2maOw5YpqnMqeb14pAIvW3AdblSYIE/9gdoHtRYe94KJ2U5QXFsgNTxDMr
	 njSp7e/AXEHxaGVRcfOYerzuTrNUD9adtorxkVKvKPrQEP5J7eAuTIwlhfOzAspH/L
	 23Om+QHFpYK0IZa5ie9YYdRhmNiAAgYX7Ch7BNu70SFmcibiIctZIGRZFWBhCOP4En
	 1/ntDFs/AiO4g==
Received: from php-smtp4.php.net (localhost [127.0.0.1])
	by php-smtp4.php.net (Postfix) with ESMTP id D780618006A
	for <internals@lists.php.net>; Wed, 30 Oct 2024 12:44:29 +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_PASS,
	FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,
	SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0
X-Spam-Virus: No
X-Envelope-From: <cmbecker69@gmx.de>
Received: from mout.gmx.net (mout.gmx.net [212.227.15.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by php-smtp4.php.net (Postfix) with ESMTPS
	for <internals@lists.php.net>; Wed, 30 Oct 2024 12:44:28 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de;
	s=s31663417; t=1730292117; x=1730896917; i=cmbecker69@gmx.de;
	bh=unZwjhEuuB++HLqbmF2q0jQLrieXqkzO84js+SZ6Fi4=;
	h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:
	 References:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding:cc:content-transfer-encoding:
	 content-type:date:from:message-id:mime-version:reply-to:subject:
	 to;
	b=dLwzvkdwmJQa/O22SktGMwowbEbw1nmU2O3+H1MrhH9GXaHeU9so3DbxxNgVxJys
	 8dS9t6isREBAnn78U5kuZsaM2XHFwaiCbzj9BFquY1hHuRQcF0QBe14PDuwETM1GM
	 IpZ0WDAzC0mh5tyUSXPwPbBjCbWQn1Dubu7YQGrhzAe6xfc3mtEolwMxFe14owcM5
	 yBEAhIRIPGpwQSYPCNihY2UvlRKzJkPMzgtBvl1uQpTI5X55YiOe1DnwwYq+2ebBJ
	 iMUkMb7XX15Jmkf6HJsRcRQEehjK/7g1UnX7R4fuWeo1Vwe5EWAhRxOmL9S+/0ETI
	 fnN9vd+KH0LgRFHL5Q==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.2.130] ([79.251.205.37]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MWzfv-1tLqQf3dWr-00Rwan; Wed, 30
 Oct 2024 13:41:56 +0100
Message-ID: <ac487d5d-3ca4-4c2d-becc-a4fb685ca386@gmx.de>
Date: Wed, 30 Oct 2024 13:41:57 +0100
Precedence: bulk
list-help: <mailto:internals+help@lists.php.net
list-unsubscribe: <mailto:internals+unsubscribe@lists.php.net>
list-post: <mailto:internals@lists.php.net>
List-Id: internals.lists.php.net
x-ms-reactions: disallow
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PHP-DEV] [RFC] Change behaviour of array sort functions to
 return a copy of the sorted array
Content-Language: de-DE
To: "Gina P. Banyard" <internals@gpb.moe>,
 PHP internals <internals@lists.php.net>
References: <ZydAaayECTRNG8Ackhb0tDgYjmdFKnkW4p0ISWlLFP5My4CsJBR1KKTylrD14Ags2GUyBLoJPf68N6Z6LoVzjG-tru8YAbmi74W5xzSkJ8I=@gpb.moe>
In-Reply-To: <ZydAaayECTRNG8Ackhb0tDgYjmdFKnkW4p0ISWlLFP5My4CsJBR1KKTylrD14Ags2GUyBLoJPf68N6Z6LoVzjG-tru8YAbmi74W5xzSkJ8I=@gpb.moe>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:GEFSp05oiLqKHiRe17s9Taf+eVzI+SUbYF8fFdFEzVcAS0CCJVA
 vuqMAV5D78ltumziUDHZLTLBi9m9SnKpKFlXXezsWAWvIwFGWTnrQL88zFSKRCEiWs7fXCb
 xDwWVOVhM4qNRN3Nk3YwPLEysdPN/lmCmvTa0S/K8eVJZA72Spl90zh3Crdddnjali4QUQY
 8DTm6qajSN5TG+u2EuJhw==
UI-OutboundReport: notjunk:1;M01:P0:TTPAZPcfnmI=;APtFE54p1puW+StwoSkkh2ux839
 kqvJSB1zg0kSAsjKNMU+9OVB0D+uHHCLZMwcfCrmud4csDDAO34dnOpoQxnIiRUHYaBe+pTq7
 TurvyHXfwtlit7Vkn+tSWMWu5AJ4p/v9U3BHgySTliVixYKJxV9tx5LK7jgHoupPVE4R7vO49
 P8mUXfR2YXuReIyCpL7/OgQezYLslWjviqEEvTYnBPEq2z8PBwTq7+aU35TJMYJzJESkKHRuX
 bFVUVj63xoztWGyZx5cr5WusNyNlRl6lzhLfE265ZCwPw78hlTW3eLU7bgr6lCz1Ly8WHv6RA
 9aE5ndHjj67sppYA1poTGOc7evAMa5WvP8U01mb/2+Rbo7gTwfpREbaxc7Xj0IvPdVus0Jgd+
 xpFEhZfb1jvB9AFJ5LZKMn2ocMLpCpKa2pNWNz6oyfCJgbKxlsr/Zyqld0cjFWaw57rr5q+1m
 IWQmf4rxJkT4fQFJkNfaSGYQxPwhUc87CmPIuKEanZinAZsehzBbFltwsWMIfZUfpDutqNJmr
 InbZj6i7IzRtbQcXTH8UFYLeRdPTPRiatFiq/2aaiEHW+5iaElE65b06vuC7L+zZgiTKfNVGL
 xhIdqIDwGbHg2a32bt7FmDZVM0rAE3WGZEEI2F0GH9aqcTu3MsAAtaHuHXeJr+KiijlN94Gz0
 usdoOckGkALPFDpYCHjYBico/1rl/bcQFOE3YYA93fFlrfgRdakf/YGeMQ41HfofvEMyO4GjL
 c2/bmFa/T79h9IH9ujh3+vuGMaYACYxwJufM5uEnZLCWba2y1aCMaVLQT/6ZUBdU0GOk/gB+X
 w/4+CY/t3YQfEG7t3fz2nFDQ==
From: cmbecker69@gmx.de ("Christoph M. Becker")

On 20.10.2024 at 19:42, Gina P. Banyard wrote:

> I would like to propose a short RFC to make the return value of the sort() and similar functions more useful:
> https://wiki.php.net/rfc/array-sort-return-array

After having thought a bit about
<https://github.com/php/php-src/issues/16648>, I don't think it makes
much sense to stick a band-aid on our sorting functions to make them
more functional.  Instead we should better introduce proper functional
functions which do not modify the given array.  Less efficient, but that
often may not matter in practise.

Christoph