Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102301 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85307 invoked from network); 19 Jun 2018 12:01:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jun 2018 12:01:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=enno.woortmann@web.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=enno.woortmann@web.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain web.de designates 217.72.192.78 as permitted sender) X-PHP-List-Original-Sender: enno.woortmann@web.de X-Host-Fingerprint: 217.72.192.78 mout.web.de Received: from [217.72.192.78] ([217.72.192.78:58607] helo=mout.web.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/62-50397-C70F82B5 for ; Tue, 19 Jun 2018 08:01:01 -0400 Received: from [10.129.18.221] ([194.76.42.30]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LiCx5-1g0gRO3AAt-00nOdh for ; Tue, 19 Jun 2018 14:00:57 +0200 To: internals@lists.php.net References: <75db877c-ef0b-7d3b-48a8-9879d90352b0@web.de> <6ec97c5a-3790-2391-6232-d0cc2d36b9c3@gmx.de> <9db5a21b-2801-3db5-44ae-d03f1e531deb@web.de> Message-ID: Date: Tue, 19 Jun 2018 14:00:57 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <9db5a21b-2801-3db5-44ae-d03f1e531deb@web.de> Content-Type: multipart/alternative; boundary="------------1F5FE85F0CE5EAD86015D3A7" X-Provags-ID: V03:K1:E9jocb6JNlGq5zagm5VH0f0SQG8HMbxDaJbrI32AeQQA4pMm/Rc Kt7YCdIuwnKachAh9GaTgVxhVOY0cjn9HgRaunK75padIVM6Wl6ipiEOipLaspz9VqvfMRQ QkGPQ+64BRCg1EWWzsecjj/JoGQ9/kYsxC3mcfOGKkDufP098oKDsWjOaYbVPq4C+5ZiMMS Cd0nf2ZOqNT1yyvc7XqQg== X-UI-Out-Filterresults: notjunk:1;V01:K0:6VTlb4Nzz1g=:iPTFUQXZWJgntAs6dQdT9O huBwbNv5jUYczg86+dzw73r3iaYUugp1CgdVRx4Oal7qw5ZCAS4eo+AowOqWLh9x+0fOrYxNW FJUyf2lt3MoDHK/sL2gYJ+q+PonToP6QUdFmGqJJprW0RKUNmXcOv1Jm/K1+M2J0Z49jZFmHd +IPMq98lZOvS6O6cAlvzHcFOL7fTJG9GrNbEV4vLJROqnTVPjGow7jkljBq3AV9x2ZG/QfkaB rzJPpq2AXIyjoXye+N+IBJT+4vuLGLuRdHbSLjMwKP3ccfJncGcIONC0Hfu40Mw+bE7Ix3fR1 3UHBvFSJJPrMXvNRqYlonwiDO/YDpRNYYoLy9+rOMvjlRR17YjXr9bYzgNn6scqeRP40Y0mOb oFd215jDv8SU6/D0MjUrEWBZa0WNGUsAbUvCb0P6gY93CrzDqy/vMCUO7aWV0IrvHJb2VMrqe CAw7q/NGw/bV1GgFgsXPmuOiR4tKZsI49vRRxOm/7UkEtmsnpM2GhFFS2+aLVTkmAgF9RkkTl VLQwMtrfid9RFy48TJd+fZFZFQnhChzndwYnKt3l2VtW0wV5i4nNbZRPCBnhWk9v976rWNYeF 2ambWZnLmMPFHMx1UoCGL7EX0LGcD0wfzgr0V2KoDjlm3aU5lWJdP24/S0RXQoviGCNS8SxD9 8IOBjqH+/p0HfUzEN5O/DrPrA5lkslePULriI9Kip/U1z5TMk7EW2OnpGc8sI1aDCGNNpI8rp KTi1QCWEqgDIa+aTE3VDF0z5LWmrLw6hzAU3IO0vASvE+R7Hs5+G22FneUFHsPDtL9CoCxvGO qQB53BC Subject: Re: [PHP-DEV] Re: [RFC][Under Discussion] Add functions array_key_first() and array_key_last() From: enno.woortmann@web.de ("Woortmann, Enno") --------------1F5FE85F0CE5EAD86015D3A7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hello internals, On 15.06.2018 at 00:37, Enno Woortmann wrote: > I've added the "Open Issues" section to the RFC and added the idea of > Côme and Gabriel to add the corresponding functions for handling the > values of the outer elements of an array to provide a complete set of > functions. > Currently I see three possibilities to handle the idea. Either extend > the scope of the RFC to cover also the handling of the values, which > could be implemented rather fast and by reusing a lot of code as the > current implementation already gathers the bucket for the first/last > element of an array, or move this idea to a future scope which should > be covered by a separate RFC. The third alternative would be to skip > the implementation of the corresponding functions. > > In my opinion it's a good idea to complete the function set by also > providing functions for the handling of array values. Both > opportunities which would lead to the completed set are practicable in > my view. I've extended the scope of the RFC to cover additionally the functions array_value_first($array) and array_value_last($array). The updated RFC is still available at https://wiki.php.net/rfc/array_key_first_last I've added a commit to the pull request located at https://github.com/php/php-src/pull/3256  to add the implementation and the tests for the extended scope. Regards, Enno --------------1F5FE85F0CE5EAD86015D3A7--