Hello Internals, I'd like to ask for feedback for my idea. Some years ago a pull request came up to add array_key_first(), array_key_last(), and array_key_index() functions (#347 <https://github.com/php/php-src/pull/347>). In the meantime a RFC was published to integrate the functions (https://wiki.php.net/rfc/array_key_first_last_index) which was discussed in the mailing list two and a half years ago (https://externals.io/message/89955).
Since the pull request and the RFC doesn't sustain a real progress and in my opinion at least the functions array_key_first(array $a) and array_key_last(array $a) would be handy in some cases I'd like to propose using a smaller functional scope as a first step including only this two functions. Additional features like returning the value of the requested element or the function array_key_index() could be implemented in a later stage if required. I implemented those two functions in a different implementation approach which tries to use as much existing code as possible available and already created a pull request at https://github.com/php/php-src/pull/3256. For the next steps I'd like to create a new RFC as the functional scope differs to the existing RFC. Therefor I request a PHP.net wiki account (wiki username: wol-soft) to create a new RFC. Regards, Enno --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus