Re: [RFC] [Discussion] array_get and array_has functions
| From: | AllenJB | Date: | Sat, 04 Apr 2026 18:15:09 +0000 |
| Subject: | Re: [RFC] [Discussion] array_get and array_has functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-130562@lists.php.net to get a copy of this message | ||
On 04/04/2026 15:06, Barel wrote:
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.php.net/rfc/array_get_and_array_has This is the link to the proposed implementation: https://github.com/php/php-src/pull/21637 Thanks!! CarlosI echo others comments with regards to looking at / comparing to existing implementations (particularly Laravel, given its popularity), and escaping. I would also suggest that the function names should explicitly indicate they use dot notation to reduce potential confusion over which array functions accept dot notation and avoid potential conflicts should similar non-dot-notation equivalents be desired (for these or any future dot-notation supporting array_ functions)