note 128804 added to function.array-key-first
| From: | Anonymous at main dot php dot net | Date: | Tue, 15 Aug 2023 11:13:14 +0000 |
| Subject: | note 128804 added to function.array-key-first | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220765@lists.php.net to get a copy of this message | ||
Edit to my previous note:
The best way to polyfill array_key_first is:
$first_key = array_keys($array)[0] ?? NULL;
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 37.174.31.168)
----
Manual Page -- https://php.net/manual/en/function.array-key-first.php
Edit -- https://main.php.net/note/edit/128804
Del: integrated -- https://main.php.net/note/delete/128804/integrated
Del: useless -- https://main.php.net/note/delete/128804/useless
Del: bad code -- https://main.php.net/note/delete/128804/bad+code
Del: spam -- https://main.php.net/note/delete/128804/spam
Del: non-english -- https://main.php.net/note/delete/128804/non-english
Del: in docs -- https://main.php.net/note/delete/128804/in+docs
Del: other reasons-- https://main.php.net/note/delete/128804
Reject -- https://main.php.net/note/reject/128804
Search -- https://main.php.net/manage/user-notes.php