note 128807 added to function.array-is-list
| From: | maruerru at main dot php dot net | Date: | Wed, 16 Aug 2023 08:08:43 +0000 |
| Subject: | note 128807 added to function.array-is-list | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220768@lists.php.net to get a copy of this message | ||
I think, this is the fastest polyfill:
<?php
if (!function_exists('array_is_list')) {
function array_is_list(array $array)
{
return $array === array_values($array);
}
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 79.195.122.45)
----
Manual Page -- https://php.net/manual/en/function.array-is-list.php
Edit -- https://main.php.net/note/edit/128807
Del: integrated -- https://main.php.net/note/delete/128807/integrated
Del: useless -- https://main.php.net/note/delete/128807/useless
Del: bad code -- https://main.php.net/note/delete/128807/bad+code
Del: spam -- https://main.php.net/note/delete/128807/spam
Del: non-english -- https://main.php.net/note/delete/128807/non-english
Del: in docs -- https://main.php.net/note/delete/128807/in+docs
Del: other reasons-- https://main.php.net/note/delete/128807
Reject -- https://main.php.net/note/reject/128807
Search -- https://main.php.net/manage/user-notes.php