note 123292 added to function.array-key-last
| From: | VitalyArt@php.net | Date: | Thu, 01 Nov 2018 12:06:22 +0000 |
| Subject: | note 123292 added to function.array-key-last | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209575@lists.php.net to get a copy of this message | ||
For PHP < 7.3.0
<?php
if (!function_exists('array_key_last')) {
/**
* Gets the last key of an array
*
* @param array $array
* @return mixed
*/
function array_key_last(array $array)
{
if (count($array)) {
end($array);
return key($array);
}
return null;
}
}
----
Server IP: 208.43.231.9
Probable Submitter: 46.148.202.46
----
Manual Page -- http://php.net/manual/en/function.array-key-last.php
Edit -- https://master.php.net/note/edit/123292
Del: integrated -- https://master.php.net/note/delete/123292/integrated
Del: useless -- https://master.php.net/note/delete/123292/useless
Del: bad code -- https://master.php.net/note/delete/123292/bad+code
Del: spam -- https://master.php.net/note/delete/123292/spam
Del: non-english -- https://master.php.net/note/delete/123292/non-english
Del: in docs -- https://master.php.net/note/delete/123292/in+docs
Del: other reasons-- https://master.php.net/note/delete/123292
Reject -- https://master.php.net/note/reject/123292
Search -- https://master.php.net/manage/user-notes.php