2017-02-11 00:12:59 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2020-04-18 06:59:16 +02:00
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @psalm-template TArray as array<TKey, mixed>
|
2017-02-11 00:12:59 +01:00
|
|
|
*
|
2020-04-18 06:59:16 +02:00
|
|
|
* @param TArray $arr
|
2020-04-17 21:07:41 +02:00
|
|
|
* @param mixed $search_value
|
|
|
|
* @param bool $strict
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2020-04-18 06:59:16 +02:00
|
|
|
* @return (TArray is non-empty-array ? non-empty-list<TKey> : list<TKey>)
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2017-02-11 00:12:59 +01:00
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function array_keys(array $arr, $search_value = null, bool $strict = false)
|
|
|
|
{
|
|
|
|
}
|
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
|
2019-10-06 21:28:41 +02:00
|
|
|
* @param array ...$arr3
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2017-02-11 00:12:59 +01:00
|
|
|
* @return array<TKey, TValue>
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2017-02-11 00:12:59 +01:00
|
|
|
*/
|
2019-10-06 21:28:41 +02:00
|
|
|
function array_intersect(array $arr, array $arr2, array ...$arr3)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
2017-02-11 00:12:59 +01:00
|
|
|
|
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
|
2019-10-06 21:28:41 +02:00
|
|
|
* @param array ...$arr3
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2018-01-25 07:04:26 +01:00
|
|
|
* @return array<TKey, TValue>
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2018-01-25 07:04:26 +01:00
|
|
|
*/
|
2019-10-06 21:28:41 +02:00
|
|
|
function array_intersect_key(array $arr, array $arr2, array ...$arr3)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
2018-01-25 07:04:26 +01:00
|
|
|
|
2020-01-07 17:40:23 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @psalm-template TValue
|
|
|
|
*
|
|
|
|
* @param array<TKey, TValue> $arr
|
|
|
|
*
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
function array_intersect_assoc(array $arr, array $arr2, array ...$arr3)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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-07-05 22:24:00 +02:00
|
|
|
*
|
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
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2017-02-11 00:12:59 +01:00
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function array_combine(array $arr, array $arr2)
|
|
|
|
{
|
|
|
|
}
|
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
|
2019-10-06 21:28:41 +02:00
|
|
|
* @param array ...$arr3
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2017-02-11 00:12:59 +01:00
|
|
|
* @return array<TKey, TValue>
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2017-02-11 00:12:59 +01:00
|
|
|
*/
|
2019-10-06 21:28:41 +02:00
|
|
|
function array_diff(array $arr, array $arr2, array ...$arr3)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
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
|
2019-10-06 21:28:41 +02:00
|
|
|
* @param array ...$arr3
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2017-02-11 00:12:59 +01:00
|
|
|
* @return array<TKey, TValue>
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2017-02-11 00:12:59 +01:00
|
|
|
*/
|
2019-10-06 21:28:41 +02:00
|
|
|
function array_diff_key(array $arr, array $arr2, array ...$arr3)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
2017-02-11 00:12:59 +01:00
|
|
|
|
2020-01-07 17:40:23 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @psalm-template TValue
|
|
|
|
*
|
|
|
|
* @param array<TKey, TValue> $arr
|
|
|
|
* @param array $arr2
|
|
|
|
* @param array ...$arr3
|
|
|
|
*
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
function array_diff_assoc(array $arr, array $arr2, array ...$arr3)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2018-02-22 00:59:31 +01:00
|
|
|
* @return array<TValue, TKey>
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2018-02-22 00:59:31 +01:00
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function array_flip(array $arr)
|
|
|
|
{
|
|
|
|
}
|
2018-02-22 00:59:31 +01:00
|
|
|
|
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
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2020-07-14 23:43:26 +02:00
|
|
|
* @return (TKey is empty ? null : ($arr is non-empty-array ? TKey : TKey|null))
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2018-04-05 06:21:14 +02:00
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function key($arr)
|
|
|
|
{
|
|
|
|
}
|
2018-04-05 06:21:14 +02:00
|
|
|
|
2019-11-27 16:59:12 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
*
|
|
|
|
* @param array<TKey, mixed> $arr
|
|
|
|
*
|
2020-07-14 23:43:26 +02:00
|
|
|
* @return (TKey is empty ? null : ($arr is non-empty-array ? TKey : TKey|null))
|
2019-11-27 16:59:12 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
function array_key_first($arr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
*
|
|
|
|
* @param array<TKey, mixed> $arr
|
|
|
|
*
|
2020-07-14 23:43:26 +02:00
|
|
|
* @return (TKey is empty ? null : ($arr is non-empty-array ? TKey : TKey|null))
|
2019-11-27 16:59:12 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
function array_key_last($arr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2017-12-30 14:47:00 +01:00
|
|
|
* @return T|false
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2017-12-30 14:47:00 +01:00
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function array_search($needle, array $haystack, bool $strict = false)
|
|
|
|
{
|
|
|
|
}
|
2019-01-20 00:11:39 +01:00
|
|
|
|
2020-01-01 21:07:34 +01:00
|
|
|
/**
|
2020-01-07 17:40:23 +01:00
|
|
|
* @psalm-template T
|
2020-01-01 21:07:34 +01:00
|
|
|
*
|
2020-01-07 17:40:23 +01:00
|
|
|
* @param T[] $arr
|
2020-01-01 21:07:34 +01:00
|
|
|
* @param-out list<T> $arr
|
|
|
|
*/
|
2020-01-07 17:40:23 +01:00
|
|
|
function shuffle(array &$arr): bool
|
2020-01-01 21:07:34 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-01-20 00:11:39 +01:00
|
|
|
/**
|
2020-01-07 17:40:23 +01:00
|
|
|
* @psalm-template T
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2020-01-07 17:40:23 +01:00
|
|
|
* @param T[] $arr
|
|
|
|
* @param-out list<T> $arr
|
|
|
|
*/
|
|
|
|
function sort(array &$arr, int $sort_flags = SORT_REGULAR): bool
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template T
|
|
|
|
*
|
|
|
|
* @param T[] $arr
|
|
|
|
* @param-out list<T> $arr
|
|
|
|
*/
|
|
|
|
function rsort(array &$arr, int $sort_flags = SORT_REGULAR): bool
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template T
|
|
|
|
*
|
|
|
|
* @param T[] $arr
|
2019-01-20 00:11:39 +01:00
|
|
|
* @param callable(T,T):int $callback
|
2020-01-07 17:40:23 +01:00
|
|
|
* @param-out list<T> $arr
|
2019-01-20 00:11:39 +01:00
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function usort(array &$arr, callable $callback): bool
|
|
|
|
{
|
|
|
|
}
|
2019-01-20 00:11:39 +01:00
|
|
|
|
2019-12-09 03:30:19 +01:00
|
|
|
/**
|
2020-01-07 17:40:23 +01:00
|
|
|
* @psalm-template TKey
|
|
|
|
* @psalm-template T
|
2019-12-09 03:30:19 +01:00
|
|
|
*
|
|
|
|
* @param array<TKey,T> $arr
|
|
|
|
* @param callable(T,T):int $callback
|
|
|
|
* @param-out array<TKey,T> $arr
|
|
|
|
*/
|
|
|
|
function uasort(array &$arr, callable $callback): bool
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-01-07 17:40:23 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template TKey
|
|
|
|
* @psalm-template T
|
|
|
|
*
|
|
|
|
* @param array<TKey,T> $arr
|
|
|
|
* @param callable(TKey,TKey):int $callback
|
|
|
|
* @param-out array<TKey,T> $arr
|
|
|
|
*/
|
|
|
|
function uksort(array &$arr, callable $callback): bool
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-02-01 00:40:40 +01:00
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-28 04:49:07 +02:00
|
|
|
* @psalm-template K of array-key
|
2019-02-01 00:40:40 +01:00
|
|
|
* @psalm-template T
|
|
|
|
*
|
2020-04-28 04:49:07 +02:00
|
|
|
* @param array<K,T> $arr
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2020-04-28 04:49:07 +02:00
|
|
|
* @return array<K,T>
|
2019-02-01 00:40:40 +01:00
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function array_change_key_case(array $arr, int $case = CASE_LOWER)
|
|
|
|
{
|
|
|
|
}
|
2019-02-01 00:40:40 +01:00
|
|
|
|
2019-03-17 23:52:42 +01:00
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2019-03-17 23:52:42 +01:00
|
|
|
* @psalm-template TKey as array-key
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2019-03-17 23:52:42 +01:00
|
|
|
* @param TKey $key
|
2019-08-26 05:46:13 +02:00
|
|
|
* @param array<TKey, mixed> $search
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2019-03-17 23:52:42 +01:00
|
|
|
* @return bool
|
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function array_key_exists($key, array $search) : bool
|
|
|
|
{
|
|
|
|
}
|
2019-03-29 00:43:14 +01:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
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
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2019-03-29 00:43:14 +01:00
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
2019-07-05 22:24:00 +02:00
|
|
|
function array_merge_recursive(array $arr, array ...$arr2)
|
|
|
|
{
|
|
|
|
}
|
2019-12-27 14:30:42 +01:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2019-12-27 14:30:42 +01:00
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @psalm-template TValue
|
|
|
|
*
|
|
|
|
* @param array<TKey> $keys
|
|
|
|
* @param TValue $value
|
|
|
|
*
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
|
|
|
function array_fill_keys(array $keys, $value): array
|
|
|
|
{
|
|
|
|
}
|
2019-12-29 17:05:08 +01:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-01-07 17:40:23 +01:00
|
|
|
* @psalm-template TKey
|
2019-12-29 17:05:08 +01:00
|
|
|
*
|
|
|
|
* @param string $pattern
|
|
|
|
* @param array<TKey,string> $input
|
|
|
|
* @param 0|1 $flags 1=PREG_GREP_INVERT
|
|
|
|
* @return array<TKey,string>
|
|
|
|
*/
|
|
|
|
function preg_grep($pattern, array $input, $flags = 0)
|
|
|
|
{
|
|
|
|
}
|
2020-01-17 19:12:00 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param resource $handle
|
|
|
|
* @param-out closed-resource $handle
|
|
|
|
*/
|
|
|
|
function fclose(&$handle) : bool
|
|
|
|
{
|
|
|
|
}
|
2020-03-02 21:33:03 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $reference
|
|
|
|
* @param-out null $reference
|
|
|
|
*/
|
|
|
|
function sodium_memzero(string &$reference): void
|
|
|
|
{
|
2020-04-07 22:48:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $var
|
|
|
|
* @param bool $return
|
|
|
|
* @return ($return is true ? string : void)
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
2020-05-26 20:18:43 +02:00
|
|
|
* @psalm-taint-specialize
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-flow ($var) -> return
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
|
|
|
function var_export($var, bool $return = false) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $var
|
|
|
|
* @param bool $return
|
|
|
|
* @return ($return is true ? string : true)
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
2020-05-26 20:18:43 +02:00
|
|
|
* @psalm-taint-specialize
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-flow ($var) -> return
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
|
|
|
function print_r($var, bool $return = false) {}
|
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-07 22:48:29 +02:00
|
|
|
* @param mixed $var
|
|
|
|
* @return ($return is true ? string : bool)
|
|
|
|
*/
|
|
|
|
function highlight_file($var, bool $return = false) {}
|
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-07 22:48:29 +02:00
|
|
|
* @param mixed $var
|
|
|
|
* @return ($return is true ? string : bool)
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($var) -> return
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
|
|
|
function highlight_string($var, bool $return = false) {}
|
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-07 22:48:29 +02:00
|
|
|
* @return ($get_as_float is true ? float : string)
|
|
|
|
*/
|
|
|
|
function microtime(bool $get_as_float = false) {}
|
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-07 22:48:29 +02:00
|
|
|
* @return ($return_float is true ? float : array<string, int>)
|
|
|
|
*/
|
|
|
|
function gettimeofday(bool $return_float = false) {}
|
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-07 22:48:29 +02:00
|
|
|
* @param numeric $number
|
|
|
|
* @return ($number is int ? int : ($number is float ? float : int|float))
|
|
|
|
*/
|
|
|
|
function abs($number) {}
|
2020-04-08 01:59:20 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-08 01:59:20 +02:00
|
|
|
* @template T as string|int|float
|
|
|
|
* @template TStep as int|float
|
|
|
|
* @param T $start
|
|
|
|
* @param T $end
|
|
|
|
* @param TStep $step
|
|
|
|
* @return (
|
|
|
|
* T is int
|
|
|
|
* ? (TStep is int ? list<int> : list<int|float>)
|
|
|
|
* : (
|
|
|
|
* T is float
|
|
|
|
* ? list<float>
|
|
|
|
* : (
|
|
|
|
* T is string
|
|
|
|
* ? list<string>
|
|
|
|
* : (
|
|
|
|
* T is int|float
|
|
|
|
* ? list<int|float>
|
|
|
|
* : list<int|float|string>
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
*/
|
|
|
|
function range($start, $end, $step = 1) {}
|
2020-04-15 03:07:44 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-04-15 03:07:44 +02:00
|
|
|
* @return (
|
|
|
|
* $format is 'd'|'j'|'N'|'w'|'z'|'W'|'m'|'n'|'t'|'L'|'o'|'Y'|'y'|'B'|'g'|'G'|'h'|'H'|'i'|'s'|'u'|'v'|'Z'|'U'|'I'
|
|
|
|
* ? numeric-string
|
|
|
|
* : ($timestamp is numeric ? string : string|false)
|
|
|
|
* )
|
|
|
|
*/
|
|
|
|
function date(string $format, int $timestamp = 0) {}
|
2020-05-11 05:58:51 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-05-11 05:58:51 +02:00
|
|
|
* @param mixed $vars
|
|
|
|
* @param-out string|int|float $vars
|
|
|
|
* @return (func_num_args() is 2 ? list<float|int|string> : int)
|
|
|
|
*/
|
|
|
|
function sscanf(string $str, string $format, &...$vars) {}
|
2020-05-11 17:36:50 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-05-11 17:36:50 +02:00
|
|
|
* @return (
|
|
|
|
* func_num_args() is 1
|
|
|
|
* ? array{dirname: string, basename: string, extension?: string, filename: string}
|
|
|
|
* : string
|
|
|
|
* )
|
|
|
|
*/
|
|
|
|
function pathinfo(string $path, int $options = \PATHINFO_DIRNAME) {}
|
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-05-11 17:36:50 +02:00
|
|
|
* @return (func_num_args() is 0 ? array<string, string> : string|false)
|
|
|
|
*/
|
|
|
|
function getenv(string $varname = '', bool $local_only = false) {}
|
2020-05-15 16:18:05 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-05-15 16:18:05 +02:00
|
|
|
* @return (
|
|
|
|
* $str is non-empty-string ? non-empty-lowercase-string : lowercase-string
|
|
|
|
* )
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($str) -> return
|
2020-05-15 16:18:05 +02:00
|
|
|
*/
|
|
|
|
function strtolower(string $str) : string {}
|
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($str) -> return
|
|
|
|
*/
|
|
|
|
function strtoupper(string $str) : string {}
|
|
|
|
|
2020-06-22 23:53:03 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($str) -> return
|
|
|
|
*/
|
|
|
|
function trim(string $str, string $character_mask = " \t\n\r\0\x0B") : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($str) -> return
|
|
|
|
*/
|
|
|
|
function ltrim(string $str, string $character_mask = " \t\n\r\0\x0B") : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($str) -> return
|
|
|
|
*/
|
|
|
|
function rtrim(string $str, string $character_mask = " \t\n\r\0\x0B") : string {}
|
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-05-15 16:18:05 +02:00
|
|
|
* @param string|array $glue
|
|
|
|
*
|
|
|
|
* @return (
|
|
|
|
* $glue is non-empty-string
|
|
|
|
* ? ($pieces is non-empty-array
|
|
|
|
* ? non-empty-string
|
|
|
|
* : string)
|
|
|
|
* : string
|
|
|
|
* )
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
2020-06-22 23:53:03 +02:00
|
|
|
* @psalm-flow ($glue) -> return
|
|
|
|
* @psalm-flow ($pieces) -(array-fetch)-> return
|
2020-05-15 16:18:05 +02:00
|
|
|
*/
|
|
|
|
function implode($glue, array $pieces = []) : string {}
|
2020-05-18 23:23:21 +02:00
|
|
|
|
2020-06-22 23:53:03 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -(array-assignment)-> return
|
|
|
|
*/
|
|
|
|
function explode(string $delimiter, string $string, int $limit = -1) : array {}
|
|
|
|
|
2020-05-18 23:23:21 +02:00
|
|
|
/**
|
|
|
|
* @param array $input
|
|
|
|
*
|
|
|
|
* @return (
|
2020-05-22 04:47:58 +02:00
|
|
|
* $input is array<int>
|
|
|
|
* ? int
|
2020-05-18 23:23:21 +02:00
|
|
|
* : ($input is array<float>
|
|
|
|
* ? float
|
|
|
|
* : float|int
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
*/
|
2020-05-22 04:47:58 +02:00
|
|
|
function array_sum(array $input) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-06-22 23:53:03 +02:00
|
|
|
* @psalm-taint-escape html
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-flow ($str) -> return
|
|
|
|
*/
|
|
|
|
function strip_tags(string $str, ?string $allowable_tags = null) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-06-22 23:53:03 +02:00
|
|
|
* @psalm-taint-escape html
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
|
|
|
function htmlentities(string $string, ?int $quote_style = null, ?string $charset = null, bool $double_encode = true) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-06-21 17:43:08 +02:00
|
|
|
* @psalm-taint-unescape html
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
|
|
|
function html_entity_decode(string $string, ?int $quote_style = null, ?string $charset = null) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-06-21 17:43:08 +02:00
|
|
|
* @psalm-taint-escape html
|
|
|
|
* @psalm-taint-escape sql
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
|
|
|
function htmlspecialchars(string $string, int $flags = ENT_COMPAT | ENT_HTML401, string $encoding = 'UTF-8', bool $double_encode = true) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-06-21 17:43:08 +02:00
|
|
|
* @psalm-taint-unescape html
|
|
|
|
* @psalm-taint-unescape sql
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
|
|
|
function htmlspecialchars_decode(string $string, ?int $quote_style = null) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-05-30 22:59:18 +02:00
|
|
|
* @param string|array<string|int|float> $search
|
|
|
|
* @param string|array<string|int|float> $replace
|
|
|
|
* @param string|array<string|int|float> $subject
|
2020-05-22 04:47:58 +02:00
|
|
|
* @param int $count
|
2020-05-30 22:59:18 +02:00
|
|
|
* @return ($subject is array ? array<string> : string)
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($replace, $subject) -> return
|
|
|
|
*/
|
|
|
|
function str_replace($search, $replace, $subject, &$count = null) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @param string|string[] $search
|
2020-05-30 22:59:18 +02:00
|
|
|
* @param string|array<string|int|float> $replace
|
|
|
|
* @param string|array<string|int|float> $subject
|
2020-05-22 04:47:58 +02:00
|
|
|
* @param int $count
|
2020-05-30 22:59:18 +02:00
|
|
|
* @return ($subject is array ? array<string> : string)
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($replace, $subject) -> return
|
|
|
|
*/
|
|
|
|
function preg_replace($search, $replace, $subject, int $limit = -1, &$count = null) {}
|
|
|
|
|
2020-06-23 21:28:31 +02:00
|
|
|
/**
|
|
|
|
* @param string|string[] $search
|
|
|
|
* @param callable(array<int, string>):string $replace
|
|
|
|
* @param string|array<string|int|float> $subject
|
|
|
|
* @param int $count
|
|
|
|
* @return ($subject is array ? array<string> : string)
|
|
|
|
*
|
2020-06-26 14:58:57 +02:00
|
|
|
* @psalm-taint-specialize
|
2020-06-23 21:28:31 +02:00
|
|
|
* @psalm-flow ($subject) -> return
|
|
|
|
*/
|
|
|
|
function preg_replace_callback($search, $replace, $subject, int $limit = -1, &$count = null) {}
|
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @return string|false
|
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
|
|
|
function substr(string $string, int $start, ?int $length = null) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($str) -> return
|
|
|
|
*/
|
|
|
|
function preg_quote(string $str, ?string $delimiter = null) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-05-22 18:33:04 +02:00
|
|
|
* @param string|int|float $args
|
|
|
|
*
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-flow ($format, $args) -> return
|
|
|
|
*/
|
|
|
|
function sprintf(string $format, ...$args) : string {}
|
2020-05-23 07:11:16 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @return string|false
|
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*
|
|
|
|
* @psalm-flow ($path) -> return
|
|
|
|
*/
|
|
|
|
function realpath(string $path) {}
|
2020-05-30 22:55:55 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @param numeric-string $left_operand
|
|
|
|
* @param numeric-string $right_operand
|
|
|
|
* @return ($right_operand is "0" ? null : numeric-string)
|
|
|
|
*/
|
2020-06-21 17:43:08 +02:00
|
|
|
function bcdiv(string $left_operand, string $right_operand, int $scale = 0): ?string {}
|