Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127013 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 7F6761A00BC for ; Tue, 1 Apr 2025 17:37:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1743528884; bh=03VJNHCY1sz8dZ6vMXB77oge3/66LP/A7eqQPdchcy4=; h=Date:To:From:Subject:In-Reply-To:References:From; b=jEdzgBCHVZAdc0XcLV6zBi4RhFNDjCsWDLr1buR0CHkOZgG/3udGgRYndzQEhzawa 9XeUJFdwb2kEct1Vxd6xMb8Wbx8jcz/d2Ea9omDARgWsQlbvHa2uPK3/ylpnQJUzpS 2nuWZmFwVVIlMxBpS9uz65SCzdlBKSycJ9gmnOjByJaZkWa56qOgLKsG9eVgWkYmuj RLiADYgKCehQGL4QKukT8p0jkOgGNKh8wz6ULw0Rqy5QZ7puEopzYaMC0Gd/MNcLcE JNnDE4KHfIewl/cFZPr7jnC7VKDbwDioX35irOVRYmdXCkRSP+m3LDB2s7aKYql2XB VHIJ+7AuXm6Gw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3CA9118006C for ; Tue, 1 Apr 2025 17:34:42 +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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-10627.protonmail.ch (mail-10627.protonmail.ch [79.135.106.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 ; Tue, 1 Apr 2025 17:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail3; t=1743529025; x=1743788225; bh=03VJNHCY1sz8dZ6vMXB77oge3/66LP/A7eqQPdchcy4=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=NvzbEDnpprlFkUYdiMixqMwRWSZXqHSkaKxmeJ/SP1S+fnkmkG+N1RS/BrrLSrrhy hiMbkFq7odDWDWJ+Uk8n/1WS7adVnBmtzKDjpw0MkHW2/pVvOWpatb5ZTcE5wb+Mma 0awVqzu/l6wFgRKxoiS1wlSZown+E9ZcYqR7Bdiu4/rFPpdpOhHOMvGu7Ogij/GyLf dcK5NVwYwEPL3XmYs9Kjz3UEZ22CKOeUXmx5eTvTCcAdprlbEPU6Ye95sLmsBf5qih /h1c3IlsUJrd6Z73TritCrHmjE1E4eY/9mJFbR9CA2Ix+X7rnZ4idSnWcealgrTQ6B 0czXBLQWFs1Ww== Date: Tue, 01 Apr 2025 17:37:01 +0000 To: PHP internals Subject: Re: [PHP-DEV] [RFC] Change behaviour of array sort functions to return a copy of the sorted array Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: a7476ec3065f8637964375a31463f9d4c37af9eb Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Sunday, 20 October 2024 at 18:42, Gina P. Banyard wr= ote: > Hello internals, >=20 > 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 >=20 > I intend for the discussion to last 2 weeks and then open the vote. Hello internals, I have decided to withdraw this RFC. The primary way for this to have been usable would have been to use the eng= ine level "@prefer-ref" parameter "attribute". However, this is rarely used and adds some minor complexity to the engine t= hat mainly exists to support less than ideal API/functions or other limitat= ions currently with PHP. And it is probably wise not to introduce more usages of said attribute. The alternative, that I would support but don't intend to do, is to add a n= ew set of `sorted()` functions. Best regards, Gina P. Banyard