芝麻web文件管理V1.00
编辑当前文件:/home/rejoandoctor/medicine.joruridoctor.com/vendor/laravel/prompts/src/Support/Utils.php
$values */ public static function allMatch(array $values, Closure $callback): bool { foreach ($values as $key => $value) { if (! $callback($value, $key)) { return false; } } return true; } /** * Get the last item from an array or null if it doesn't exist. * * @param array
$array */ public static function last(array $array): mixed { return array_reverse($array)[0] ?? null; } /** * Returns the key of the first element in the array that satisfies the callback. * * @param array
$array */ public static function search(array $array, Closure $callback): int|string|false { foreach ($array as $key => $value) { if ($callback($value, $key)) { return $key; } } return false; } }