Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127499 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 lists.php.net (Postfix) with ESMTPS id A68051A00BC for ; Wed, 28 May 2025 16:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1748450410; bh=LRqKPZmUwI0uFkChUfhwNli2JwshVBcFlQoCfTt/MRk=; h=Date:From:To:Subject:In-Reply-To:References:From; b=XP2toUTjKwVNMJcYU8dKl54JONDI87H7fbHdVhTWR0UjWk1P/naYGto5R2ABSfmg2 +oDYpFFRe10pg/hXjFoU7tiQBoAALuYFk2EDox3YKk54wFfvvrpiNoPJmbJVvN+aK1 tqZ+sCGtlEYGRvmUjSX5H9uLQ5AWp0Yed5/WVi9LZtySOD+U0N0BnJeMZ+73/YtoTP 5yk4kVzKDLLM5uQyj2KBsRUvY/b+3wZIvfd9L9E3T6dtchRZw+qlDPLcFy94VSCwCN l5GHewtJmssU8czwywnDd0SGTAv0sdiInjuj3S50GfxfEbQ5Ctem0k0cKv0xpOCoRa m7zMc/3ZTjUUg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 29C2318006A for ; Wed, 28 May 2025 16:40:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 ; Wed, 28 May 2025 16:40:08 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id E6BAA11400FE for ; Wed, 28 May 2025 12:42:14 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Wed, 28 May 2025 12:42:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1748450534; x=1748536934; bh=bupq0JxLnGl1UtbZQj3ska1avcRF4VMVtbjch7rf344=; b= tjgCrvNgxg99r5KlWEK2R/7KlU0yI7H2o1Tilr8IrQDz37wOTzKTnMDfkkjBkZOI uLkA0hFl2h3bZ2amEoHEFE2vHq7uYNBR1FwBDcuB8IxA+qyzOfoxKi6OfFxuBro3 W/fDUcigVimi4umPCk/ltpbyGSTx5V9+INshOSlIkmvqEMb+8Zo55Jl8NNu3ql8u vf6TYMxorVK7Yr7IxYhMh6rCpqcMdYIiJXoQtTd4r7fEcIjhzxuInNpa96VNj6fj 5/i6AJLudOcxKSvtxiU1iuXKR1Q2W411UQN7JdUKiokGf4XnkzbfrmuB4eKO/k7J PQxENHgAIyqyxgoHEItU0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1748450534; x=1748536934; bh=b upq0JxLnGl1UtbZQj3ska1avcRF4VMVtbjch7rf344=; b=QMHU4uVAjeNpYdRhE zHx8/2mllf4PPBHC4+tpfnbIn6yVYLAXLFNdN4h0ufENpcbaJzjVHBRN2FeWZknW hw24HYRYN7UlvsI0WYNQfA3BlpavIgw8xzOE0RCduGHEB8Q+Wu7ytAbgiUd1mELP QCPDwWiU8kc6Nk5S+JFapk+Ag/VFuuM0X6YrYhPV4SdAiAd54QbKvL6qdze/U3ZU D+MCOOxoIiHQ6ZkMawADhFra9bXczMvkDMg4LGaWyCPuQYNe3fx4P8g+MnUcU70E eWoBr97mMMvu+a2ay5byGX3RebcaaAZsggK3BXh4Jfx32JKJoGQa6DrecsiYlzKN XYlQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvfeejieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhepfffhvffufggjfhfkgggtgfesthhqmhdttderjeenucfhrhhomhep fdftohifrghnucfvohhmmhhinhhsucglkffoufhorfgnfdcuoehimhhsohhprdhphhhpse hrfigvtgdrtghordhukheqnecuggftrfgrthhtvghrnhepheelffetiefgveduteefudeg tdduveeludegueegleehiefhhefgtdekveevgfelnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepihhmshhophdrphhhphesrhifvggtrdgtohdr uhhkpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 28 May 2025 12:42:13 -0400 (EDT) Date: Wed, 28 May 2025 17:17:48 +0100 To: internals@lists.php.net Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_=5BRFC=5D_Add?= =?US-ASCII?Q?_preserve=5Fkey=5Ftypes_to_a?= =?US-ASCII?Q?rray=5Fkeys=28=29_to_prevent_unintended_int_conversion?= User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <78B00771-EAA7-4191-8B34-C6FAA53B6B66@rwec.co.uk> 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: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 28 May 2025 14:42:01 BST, "=E9=A9=AC=E6=AD=A3=E5=BC=BA" wrote: > First, we could add a parameter like preserve_key_types to array > functions such as array_keys()/array_search() to temporarily handle th= e > implicit conversion issue=2E This will not help=2E The keys are changed when they are *written* to the = array, not when they are read back out=2E No option to array_keys can tell = you whether the key 42 was originally set as '42', because that information= is not stored anywhere=2E > Alternatively, we could introduce a new data type "Map" Yes, I think this was suggested a couple of times on the previous thread= =2E It would be a useful feature, but probably not easy to implement effici= ently and integrate thoroughly into the language=2E Regards, Rowan Tommins [IMSoP]