2017-02-11 00:12:59 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template T as array-key
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
|
|
|
* @param array<T, mixed> $arr
|
2017-03-24 15:13:20 +01:00
|
|
|
* @param mixed $search_value
|
|
|
|
* @param bool $strict
|
2017-02-11 00:12:59 +01:00
|
|
|
* @return array<int, T>
|
|
|
|
*/
|
2017-03-24 15:13:20 +01:00
|
|
|
function array_keys(array $arr, $search_value = null, bool $strict = false) {}
|
2017-02-11 00:12:59 +01:00
|
|
|
|
|
|
|
/**
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template T
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
|
|
|
* @param array<mixed, T> $arr
|
|
|
|
* @return array<int, T>
|
|
|
|
*/
|
|
|
|
function array_values(array $arr) {}
|
|
|
|
|
|
|
|
/**
|
2019-02-18 02:38:33 +01:00
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @psalm-template TValue
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
2019-02-18 02:38:33 +01:00
|
|
|
* @param array<TKey, TValue> $arr
|
2017-03-30 17:04:47 +02:00
|
|
|
* @param int $sort_flags
|
2019-02-18 02:38:33 +01:00
|
|
|
* @return array<TKey, TValue>
|
2017-02-11 00:12:59 +01:00
|
|
|
*/
|
2017-03-30 17:04:47 +02:00
|
|
|
function array_unique(array $arr, int $sort_flags = 0) {}
|
2017-02-11 00:12:59 +01:00
|
|
|
|
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template TValue
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
|
|
|
* @param array<TKey, TValue> $arr
|
|
|
|
* @param array $arr2
|
|
|
|
* @param array|null $arr3
|
|
|
|
* @param array|null $arr4
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
|
|
|
function array_intersect(array $arr, array $arr2, array $arr3 = null, array $arr4 = null) {}
|
|
|
|
|
2018-01-25 07:04:26 +01:00
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template TValue
|
2018-01-25 07:04:26 +01:00
|
|
|
*
|
|
|
|
* @param array<TKey, TValue> $arr
|
|
|
|
* @param array $arr2
|
|
|
|
* @param array|null $arr3
|
|
|
|
* @param array|null $arr4
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
|
|
|
function array_intersect_key(array $arr, array $arr2, array $arr3 = null, array $arr4 = null) {}
|
|
|
|
|
2017-02-11 00:12:59 +01:00
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template TValue
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
|
|
|
* @param array<mixed, TKey> $arr
|
|
|
|
* @param array<mixed, TValue> $arr2
|
2019-05-05 08:11:52 +02:00
|
|
|
* @return array<TKey, TValue>|false
|
2019-05-05 22:42:36 +02:00
|
|
|
* @psalm-ignore-falsable-return
|
2017-02-11 00:12:59 +01:00
|
|
|
*/
|
|
|
|
function array_combine(array $arr, array $arr2) {}
|
|
|
|
|
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template TValue
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
|
|
|
* @param array<TKey, TValue> $arr
|
|
|
|
* @param array $arr2
|
|
|
|
* @param array|null $arr3
|
|
|
|
* @param array|null $arr4
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
|
|
|
function array_diff(array $arr, array $arr2, array $arr3 = null, array $arr4 = null) {}
|
|
|
|
|
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template TValue
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
|
|
|
* @param array<TKey, TValue> $arr
|
|
|
|
* @param array $arr2
|
|
|
|
* @param array|null $arr3
|
|
|
|
* @param array|null $arr4
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
|
|
|
function array_diff_key(array $arr, array $arr2, array $arr3 = null, array $arr4 = null) {}
|
|
|
|
|
2018-02-22 00:59:31 +01:00
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template TValue
|
2018-02-22 00:59:31 +01:00
|
|
|
*
|
|
|
|
* @param array<TKey, TValue> $arr
|
|
|
|
* @return array<TValue, TKey>
|
|
|
|
*/
|
|
|
|
function array_flip(array $arr) {}
|
|
|
|
|
2018-04-05 06:21:14 +02:00
|
|
|
/**
|
2019-01-05 06:15:53 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2018-04-05 06:21:14 +02:00
|
|
|
*
|
|
|
|
* @param array<TKey, mixed> $arr
|
2018-07-23 01:15:40 +02:00
|
|
|
* @return TKey|null
|
|
|
|
* @psalm-ignore-nullable-return
|
2018-04-05 06:21:14 +02:00
|
|
|
*/
|
|
|
|
function key($arr) {}
|
|
|
|
|
2019-01-24 21:03:13 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template TValue
|
|
|
|
*
|
|
|
|
* @param TValue $value
|
|
|
|
* @return array<int, TValue>
|
|
|
|
*/
|
|
|
|
function array_fill( int $start_index, int $num, $value) : array {}
|
|
|
|
|
2017-12-30 14:47:00 +01:00
|
|
|
/**
|
2018-12-02 20:59:08 +01:00
|
|
|
* @psalm-template T
|
2017-12-30 14:47:00 +01:00
|
|
|
*
|
|
|
|
* @param mixed $needle
|
|
|
|
* @param array<T, mixed> $haystack
|
|
|
|
* @param bool $strict
|
|
|
|
* @return T|false
|
|
|
|
*/
|
|
|
|
function array_search($needle, array $haystack, bool $strict = false) {}
|
2019-01-20 00:11:39 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @template T
|
|
|
|
* @param array<mixed,T> $arr
|
|
|
|
* @param callable(T,T):int $callback
|
|
|
|
* @param-out array<int,T> $arr
|
|
|
|
*/
|
|
|
|
function usort(array &$arr, callable $callback): bool {}
|
|
|
|
|
2019-02-01 00:40:40 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template T
|
|
|
|
*
|
|
|
|
* @param array<string, T> $arr
|
2019-05-05 21:30:59 +02:00
|
|
|
* @return array<string, T>
|
2019-02-01 00:40:40 +01:00
|
|
|
*/
|
2019-02-05 00:00:23 +01:00
|
|
|
function array_change_key_case(array $arr, int $case = CASE_LOWER) {}
|
2019-02-01 00:40:40 +01:00
|
|
|
|
2019-02-06 20:39:49 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template T
|
|
|
|
*
|
|
|
|
* @param array<array-key, T> $arr
|
|
|
|
*
|
|
|
|
* @return array<int, array<array-key, T>>
|
|
|
|
*/
|
|
|
|
function array_chunk(array $arr, int $size, bool $preserve_keys = false) {}
|
2019-03-17 23:52:42 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @param TKey $key
|
|
|
|
* @param array<TKey, mixed> $search
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
function array_key_exists($key, array $search) : bool { }
|
2019-03-29 00:43:14 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @psalm-template TValue
|
|
|
|
*
|
2019-03-29 14:50:33 +01:00
|
|
|
* @param array<TKey, TValue> $arr
|
2019-03-29 00:43:14 +01:00
|
|
|
* @param array<TKey, TValue> ...$arr2
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
|
|
|
function array_merge_recursive(array $arr, array ...$arr2) {}
|