note 130177 added to function.array-any
| From: | 453034559@qq.com | Date: | Thu, 20 Mar 2025 09:04:11 +0000 |
| Subject: | note 130177 added to function.array-any | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-222009@lists.php.net to get a copy of this message | ||
According to my testing, it should be like this
<?php
if (! function_exists('array_any')) {
function array_any(array $array, callable $callable) {
foreach ($array as $key => $value) {
if ($callable($value, $key))
return true;
}
return false;
}
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 171.223.192.97)
----
Manual Page -- https://php.net/manual/en/function.array-any.php
Edit -- https://main.php.net/note/edit/130177
Del: integrated -- https://main.php.net/note/delete/130177/integrated
Del: useless -- https://main.php.net/note/delete/130177/useless
Del: bad code -- https://main.php.net/note/delete/130177/bad+code
Del: spam -- https://main.php.net/note/delete/130177/spam
Del: non-english -- https://main.php.net/note/delete/130177/non-english
Del: in docs -- https://main.php.net/note/delete/130177/in+docs
Del: other reasons-- https://main.php.net/note/delete/130177
Reject -- https://main.php.net/note/reject/130177
Search -- https://main.php.net/manage/user-notes.php