note 123775 added to function.array-key-first

From: Date: Sat, 13 Apr 2019 09:25:34 +0000
Subject: note 123775 added to function.array-key-first
Groups: php.notes 
Request: Send a blank email to php-notes+get-210597@lists.php.net to get a copy of this message
for <7.3.0 <?php if (!function_exists('array_key_first')) { function array_key_first(array $arr){ foreach($arr as $key=>$unused){ return $key; } return NULL; } } ?> - solution of "mirko dot pagliai at gmail" is slow, solution from "mail at vitalyart dot ru " edits the internal array pointer, the solution from "devonblzx" is slow, and the solution from "manzoorwanijk" is.. ok i guess, but this is better. ---- Server IP: 208.43.231.9 Probable Submitter: 185.85.3.142 (proxied: 85.165.153.124) ---- Manual Page -- http://php.net/manual/en/function.array-key-first.php Edit -- https://master.php.net/note/edit/123775 Del: integrated -- https://master.php.net/note/delete/123775/integrated Del: useless -- https://master.php.net/note/delete/123775/useless Del: bad code -- https://master.php.net/note/delete/123775/bad+code Del: spam -- https://master.php.net/note/delete/123775/spam Del: non-english -- https://master.php.net/note/delete/123775/non-english Del: in docs -- https://master.php.net/note/delete/123775/in+docs Del: other reasons-- https://master.php.net/note/delete/123775 Reject -- https://master.php.net/note/reject/123775 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#210597) next »