Re: [RFC] Add preserve_key_types to array_keys() to prevent unintended int conversion
| From: | Daikaras | Date: | Tue, 27 May 2025 07:42:38 +0000 |
| Subject: | Re: [RFC] Add preserve_key_types to array_keys() to prevent unintended int conversion | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127476@lists.php.net to get a copy of this message | ||
As Kamil mentioned, this is not limited to a single function but to array type as a whole. See previous discussion https://externals.io/message/116735.
On 5/24/2025 6:43 PM, 马正强 wrote:
I propose adding a |preserve_key_types| parameter to |array_keys()| to address issues caused by automatic conversion of string-numeric keys to integers.