Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130560 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 CDE371A00BC for ; Sat, 4 Apr 2026 16:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1775318662; bh=Me9hejwdGarKBUzVj7MG3GzR9Ng2exjugfXaopjX6YI=; h=From:To:References:In-Reply-To:Subject:Date:From; b=HipSEkfcx41iTvBaLz2d/NYSraoQO6QvpTOTW1yVL3AX56qOZi9uNQ29LJPP3lm8F WjCvNK5fUCpOTUGKF37lg74E8AGkJr/oPGGLnr5ZwFBd7mgz8GiScE3HglPz3hp/T9 kE5bMxQV3zV9lUsT6ppoQNiICrDKFD7vLFVuOUsXqi46x+vltzkkosPzeBUdYEEAfF J5HiFbl+5gwFxHb4+tOGupiUK2fvrwOSu02fM3kD89eXCHBTutOvCLo69DqGx+Ykn1 E8jZcfqN3UlJqrawHKt1Y/MM3NovpFlt2JQ89oM385IKTyUvsGjcfGuym7z1lDxoBu vDncHqye5iy1A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E8D431801E6 for ; Sat, 4 Apr 2026 16:04:20 +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=0.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_PDS_PRO_TLD autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from beige.elm.relay.mailchannels.net (beige.elm.relay.mailchannels.net [23.83.212.16]) (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 ; Sat, 4 Apr 2026 16:04:20 +0000 (UTC) X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4655A18351C; Sat, 04 Apr 2026 16:04:14 +0000 (UTC) Received: from server52.areait.lv (trex-green-0.trex.outbound.svc.cluster.local [100.121.207.159]) (Authenticated sender: yszpovajlk) by relay.mailchannels.net (Postfix) with ESMTPA id 9C890183A52; Sat, 04 Apr 2026 16:04:12 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; d=mailchannels.net; s=arc-2022; cv=none; t=1775318653; b=oISzX4I80dxk2x2BoTUpfq7ctfqcQPdxoHmSXXb+F1aWLXESk+ZwWdaHMZB3YvQjGkNEVX JpBQrsbSXoTFhtQ44CmrGDWG8h/uo4LyblGXkTlsjpN4Gm6wvphZ46BQMhm/TLG8Cr2bcb J675EHO20PZDb68Qu6qn51P60TbHmBGBtp0sbkV3MINuCWK/g58czSVpMePiItjoccij1l zYzk+Px8fd51wp8J89APOt0JmubelluMmvyk81BDMO+vgE3xqK8cONNPC6p2aZOXuQJSCc bvUU20EXgZpP5oGASRZi8B89B8+JVEkVQCEabV2FsytXMpEVN0NqiaMxA114ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1775318653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MQWRmteudiFH+TvFSds7AJW10RLdHxaXalQwiooQ4fY=; b=RTMFWTC1K+D+WAs2yjbmimujznhAYrn4B9v+d+HID2sEY+544YBU6EFZepGqgcJBO8jQ4l jVMg8tDwK3KO/julCWNTF9bKjFpznNyb/Oi+Y70L3KAba5ooQ1+IOGKqSnNzTWihS4SusG 8pMuQW0DxPPE2EqhrFRVBxqXBSaa3W9OVPisLkmMZQOeavwGzRLv9+cEu9hGiSayNhahJ1 F0klU98ZWtCux+uOVp+4rM4lNu6l/liRfUze0stOFIXYRhb5NgLlS/izOeSTRsKDAQmcRr eGOmK62YAVCj4w4cLQGfhHwj/BWQRf+705LFyw771eblsPrbiQfnxfgSDMYgbQ== ARC-Authentication-Results: i=1; rspamd-7d86dcc447-zh82z; auth=pass smtp.auth=yszpovajlk smtp.mailfrom=juris@glaive.pro X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro X-MC-Relay: Neutral X-MailChannels-SenderId: yszpovajlk|x-authuser|juris@glaive.pro X-MailChannels-Auth-Id: yszpovajlk X-Duck-Average: 61fe5ad23c731332_1775318653925_833942533 X-MC-Loop-Signature: 1775318653925:2884331199 X-MC-Ingress-Time: 1775318653925 Received: from server52.areait.lv (server52.areait.lv [83.149.95.205]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.121.207.159 (trex/7.1.5); Sat, 04 Apr 2026 16:04:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=glaive.pro; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:In-Reply-To: References:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MQWRmteudiFH+TvFSds7AJW10RLdHxaXalQwiooQ4fY=; b=EM/5+QDQ7BNAT3FThuaZ1X+2yg gYFIUZyZDVqYVkmmcvlNTwCAuOZpkcXEk/xS8mEOO4cRsqraY+0hiwLPMpcUmiNrhrgde0/yDtx2i sV9Ip/frJ7FUlyI1wl6vWb3ljqlJDZyh6O9Q0gOtpHYCp6mAt60LuP3X1oR2dr+9JK/URDovhO4gK mc4Y0OrOwkmGzRWdT0nW8p31ypfAQE6T9OeYjiPHA7McMFVt7ZBcUSHvkjOaj+JS1DsCu9mr+WwpX wT32q5VjJS/uoy0ki7AaZtHT0/Odh/D8ScYfdRBPWrDYN/a9kJ+yh0Z5LBJCbhBNV91+Gn3KgIEz1 EXHq2pgw==; Received: from [77.93.29.116] (port=59801 helo=LAPTOPHKIOPCGI) by server52.areait.lv with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.99.1) (envelope-from ) id 1w93To-00000007jL6-0F3p; Sat, 04 Apr 2026 19:04:10 +0300 To: "'Barel'" , "'PHP internals'" References: In-Reply-To: Subject: RE: [PHP-DEV] [RFC] [Discussion] array_get and array_has functions Date: Sat, 4 Apr 2026 19:04:08 +0300 Message-ID: <01d101dcc44c$abf63430$03e29c90$@glaive.pro> Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01D2_01DCC465.D144F2D0" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIdf84eGCNDNmOWdASwrxDnondHqrVNkf6A Content-Language: lv X-AuthUser: juris@glaive.pro From: juris@glaive.pro ("Juris Evertovskis") This is a multipart message in MIME format. ------=_NextPart_000_01D2_01DCC465.D144F2D0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =20 =20 From: Barel =20 Sent: Saturday, April 4, 2026 5:06 PM To: PHP internals Subject: [PHP-DEV] [RFC] [Discussion] array_get and array_has functions =20 Hi, =20 I would like to open the discussion on my proposal to add two small, = focused array functions for retrieving and checking nested array = elements using dot notation. This is the link to the RFC: = https://wiki.php.net/rfc/array_get_and_array_has This is the link to the proposed implementation: = https://github.com/php/php-src/pull/21637 =20 Thanks!! =20 Carlos =20 Hey, =20 Very useful functions! =20 Why did you decide to not handle keys with dots? It would prevent these = functions from being used in tools that might sometimes receive = something like `example.com`as the key. The similar userland functions = that I=E2=80=99ve seen do at least support the exact dotted key as well, = even if not offering a full dotted<->nested equivalence with priority = rules, partial nested-dotted and other fun stuff. =20 I=E2=80=99ve also found it quite useful to have = `[=E2=80=98user.name=E2=80=99 =3D> =E2=80=98Alice=E2=80=99]` be = equivalent to `[=E2=80=98user=E2=80=99 =3D> [=E2=80=98name=E2=80=99 =3D> = =E2=80=98Alice=E2=80=99]]` for testing/mocking more complex structures. =20 BR, Juris ------=_NextPart_000_01D2_01DCC465.D144F2D0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

 

 

From:<= /b> = Barel <barel.barelon@gmail.com>
Sent: Saturday, April = 4, 2026 5:06 PM
To: PHP internals = <internals@lists.php.net>
Subject: [PHP-DEV] [RFC] = [Discussion] array_get and array_has = functions

 

Hi,

 

I = would like to open the discussion on my proposal to add two small, = focused array functions for retrieving and checking nested array = elements using dot notation.

This is the link to the RFC: https://wiki.ph= p.net/rfc/array_get_and_array_has

This is the link to the = proposed implementation: https://github.com/php= /php-src/pull/21637

 

Thanks!!

 

Carlos

 

Hey,

 

Very useful = functions!

 

Why did you decide to = not handle keys with dots? It would prevent these functions from being = used in tools that might sometimes receive something like = `example.com`as the key. The similar userland functions that = I=E2=80=99ve seen do at least support the exact dotted key as well, even = if not offering a full dotted<->nested equivalence with priority = rules, partial nested-dotted and other fun = stuff.

 

I=E2=80=99ve also = found it quite useful to have `[=E2=80=98user.name=E2=80=99 =3D> = =E2=80=98Alice=E2=80=99]` be equivalent to `[=E2=80=98user=E2=80=99 = =3D> [=E2=80=98name=E2=80=99 =3D> =E2=80=98Alice=E2=80=99]]` for = testing/mocking more complex structures.

 

BR,

Juris

------=_NextPart_000_01D2_01DCC465.D144F2D0--