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
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param TArray $array
|
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
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_keys(array $array, $search_value = null, bool $strict = false)
|
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
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> $array
|
|
|
|
* @param array ...$arrays
|
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
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_intersect(array $array, array ...$arrays)
|
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
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> $array
|
|
|
|
* @param array ...$arrays
|
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
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_intersect_key(array $array, array ...$arrays)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
2018-01-25 07:04:26 +01:00
|
|
|
|
2020-10-06 15:13:19 +02:00
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
|
|
|
* @psalm-template TValue
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> $array
|
|
|
|
* @param array ...$arrays
|
2020-01-07 17:40:23 +01:00
|
|
|
*
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_intersect_assoc(array $array, array ...$arrays)
|
2020-01-07 17:40:23 +01: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
|
|
|
*
|
2021-07-27 17:05:27 +02:00
|
|
|
* @param array<mixed, TKey> $keys
|
|
|
|
* @param array<mixed, TValue> $values
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2021-03-16 18:43:49 +01:00
|
|
|
* @return (
|
|
|
|
* PHP_MAJOR_VERSION is 8 ?
|
2021-07-27 17:05:27 +02:00
|
|
|
* ($keys is non-empty-array ? non-empty-array<TKey, TValue> : array<TKey, TValue>) :
|
|
|
|
* ($keys is non-empty-array ? non-empty-array<TKey, TValue>|false : array<TKey, TValue>|false)
|
2021-03-16 18:43:49 +01:00
|
|
|
* )
|
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
|
|
|
*/
|
2021-07-27 17:05:27 +02:00
|
|
|
function array_combine(array $keys, array $values)
|
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
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> $array
|
|
|
|
* @param array ...$arrays
|
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
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_diff(array $array, array ...$arrays)
|
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
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> $array
|
|
|
|
* @param array ...$arrays
|
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
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_diff_key(array $array, array ...$arrays)
|
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
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> $array
|
|
|
|
* @param array ...$arrays
|
2020-01-07 17:40:23 +01:00
|
|
|
*
|
|
|
|
* @return array<TKey, TValue>
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_diff_assoc(array $array, array ...$arrays)
|
2020-01-07 17:40:23 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> $array
|
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
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_flip(array $array)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
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
|
2020-07-15 15:49:30 +02:00
|
|
|
* @psalm-template TArray as array<TKey, mixed>
|
2018-04-05 06:21:14 +02:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param TArray $array
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2020-07-20 10:49:36 +02:00
|
|
|
* @return (TArray is array<empty, empty> ? null : TKey|null)
|
2019-09-08 17:32:04 +02:00
|
|
|
* @psalm-pure
|
2020-07-22 05:16:56 +02:00
|
|
|
* @psalm-ignore-nullable-return
|
2018-04-05 06:21:14 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function key($array)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
2018-04-05 06:21:14 +02:00
|
|
|
|
2019-11-27 16:59:12 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
2020-07-15 15:49:30 +02:00
|
|
|
* @psalm-template TArray as array<TKey, mixed>
|
2019-11-27 16:59:12 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param TArray $array
|
2019-11-27 16:59:12 +01:00
|
|
|
*
|
2020-07-15 15:49:30 +02:00
|
|
|
* @return (TArray is array<empty, empty> ? null : (TArray is non-empty-array ? TKey : TKey|null))
|
2019-11-27 16:59:12 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_key_first($array)
|
2019-11-27 16:59:12 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template TKey as array-key
|
2020-07-15 15:49:30 +02:00
|
|
|
* @psalm-template TArray as array<TKey, mixed>
|
2019-11-27 16:59:12 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param TArray $array
|
2019-11-27 16:59:12 +01:00
|
|
|
*
|
2020-07-15 15:49:30 +02:00
|
|
|
* @return (TArray is array<empty, empty> ? null : (TArray is non-empty-array ? TKey : TKey|null))
|
2019-11-27 16:59:12 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_key_last($array)
|
2019-11-27 16:59:12 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
2022-04-28 16:07:43 +02:00
|
|
|
* @psalm-template TArray as array<T>
|
2020-01-01 21:07:34 +01:00
|
|
|
*
|
2022-04-28 16:07:43 +02:00
|
|
|
* @param TArray $array
|
|
|
|
* @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
|
2020-01-01 21:07:34 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function shuffle(array &$array): 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
|
2022-04-28 15:44:39 +02:00
|
|
|
* @psalm-template TArray as array<T>
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2022-04-23 15:51:50 +02:00
|
|
|
* @param TArray $array
|
|
|
|
* @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
|
2020-01-07 17:40:23 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function sort(array &$array, int $flags = SORT_REGULAR): bool
|
2020-01-07 17:40:23 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template T
|
2022-04-28 16:01:17 +02:00
|
|
|
* @psalm-template TArray as array<T>
|
2020-01-07 17:40:23 +01:00
|
|
|
*
|
2022-04-28 16:01:17 +02:00
|
|
|
* @param TArray $array
|
|
|
|
* @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
|
2020-01-07 17:40:23 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function rsort(array &$array, int $flags = SORT_REGULAR): bool
|
2020-01-07 17:40:23 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-template T
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param T[] $array
|
2019-01-20 00:11:39 +01:00
|
|
|
* @param callable(T,T):int $callback
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param-out list<T> $array
|
2019-01-20 00:11:39 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function usort(array &$array, callable $callback): bool
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
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
|
2022-04-28 16:49:32 +02:00
|
|
|
* @psalm-template TArray as array<TKey,T>
|
2019-12-09 03:30:19 +01:00
|
|
|
*
|
2022-04-28 16:49:32 +02:00
|
|
|
* @param TArray $array
|
2019-12-09 03:30:19 +01:00
|
|
|
* @param callable(T,T):int $callback
|
2022-04-28 16:49:32 +02:00
|
|
|
* @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
|
2019-12-09 03:30:19 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function uasort(array &$array, callable $callback): bool
|
2019-12-09 03:30:19 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-01-07 17:40:23 +01:00
|
|
|
/**
|
|
|
|
* @psalm-template TKey
|
|
|
|
* @psalm-template T
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey,T> $array
|
2020-01-07 17:40:23 +01:00
|
|
|
* @param callable(TKey,TKey):int $callback
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param-out array<TKey,T> $array
|
2020-01-07 17:40:23 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function uksort(array &$array, callable $callback): bool
|
2020-01-07 17:40:23 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<K,T> $array
|
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
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_change_key_case(array $array, int $case = CASE_LOWER)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
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
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, mixed> $array
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2019-03-17 23:52:42 +01:00
|
|
|
* @return bool
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_key_exists($key, array $array) : bool
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
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
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey, TValue> ...$arrays
|
2019-07-05 22:24:00 +02:00
|
|
|
*
|
2019-03-29 00:43:14 +01:00
|
|
|
* @return array<TKey, TValue>
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_merge_recursive(array ...$arrays)
|
2019-07-05 22:24:00 +02:00
|
|
|
{
|
|
|
|
}
|
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
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array<TKey,string> $array
|
2019-12-29 17:05:08 +01:00
|
|
|
* @param 0|1 $flags 1=PREG_GREP_INVERT
|
|
|
|
* @return array<TKey,string>
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function preg_grep($pattern, array $array, $flags = 0)
|
2019-12-29 17:05:08 +01:00
|
|
|
{
|
|
|
|
}
|
2020-01-17 19:12:00 +01:00
|
|
|
|
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param resource $stream
|
2021-11-04 16:10:59 +01:00
|
|
|
* @param-out closed-resource $stream
|
2020-01-17 19:12:00 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function fclose(&$stream) : bool
|
2020-01-17 19:12:00 +01:00
|
|
|
{
|
|
|
|
}
|
2020-03-02 21:33:03 +01:00
|
|
|
|
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param string $string
|
2021-11-04 16:10:59 +01:00
|
|
|
* @param-out null $string
|
2020-03-02 21:33:03 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function sodium_memzero(string &$string): void
|
2020-03-02 21:33:03 +01:00
|
|
|
{
|
2020-04-07 22:48:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param mixed $value
|
2020-04-07 22:48:29 +02:00
|
|
|
* @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
|
2021-11-04 16:10:59 +01:00
|
|
|
* @psalm-flow ($value) -> return
|
|
|
|
* @psalm-taint-sink html $value
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function var_export($value, bool $return = false) {}
|
2020-04-07 22:48:29 +02:00
|
|
|
|
2021-05-24 22:42:18 +02:00
|
|
|
/**
|
|
|
|
* @param mixed $value
|
|
|
|
* @param list<mixed> $values
|
|
|
|
* @return string
|
|
|
|
*
|
|
|
|
* @psalm-taint-specialize
|
|
|
|
* @psalm-flow ($value, $values) -> return
|
|
|
|
* @psalm-taint-sink html $value
|
|
|
|
* @psalm-taint-sink html $values
|
|
|
|
*/
|
|
|
|
function var_dump($value, ...$values) {}
|
|
|
|
|
2020-04-07 22:48:29 +02:00
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param mixed $value
|
2020-04-07 22:48:29 +02:00
|
|
|
* @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
|
2021-11-04 16:10:59 +01:00
|
|
|
* @psalm-flow ($value) -> return
|
|
|
|
* @psalm-taint-sink html $value
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function print_r($value, bool $return = false) {}
|
2020-04-07 22:48:29 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-taint-sink file $filename
|
|
|
|
* @param mixed $filename
|
2020-04-07 22:48:29 +02:00
|
|
|
* @return ($return is true ? string : bool)
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function highlight_file($filename, bool $return = false) {}
|
2020-04-07 22:48:29 +02:00
|
|
|
|
2020-11-22 18:09:55 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-taint-sink file $filename
|
|
|
|
* @param mixed $filename
|
2020-11-22 18:09:55 +01:00
|
|
|
* @return ($return is true ? string : bool)
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function show_source($filename, bool $return = false) {}
|
2020-11-22 18:09:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-taint-sink file $filename
|
|
|
|
*/
|
|
|
|
function php_strip_whitespace(string $filename) : string {}
|
|
|
|
|
2020-04-07 22:48:29 +02:00
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param mixed $string
|
2020-04-07 22:48:29 +02:00
|
|
|
* @return ($return is true ? string : bool)
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
2021-11-04 16:10:59 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function highlight_string($string, bool $return = false) {}
|
2020-04-07 22:48:29 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @return ($as_float is true ? float : string)
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function microtime(bool $as_float = false) {}
|
2020-04-07 22:48:29 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @return ($as_float is true ? float : array<string, int>)
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function gettimeofday(bool $as_float = false) {}
|
2020-04-07 22:48:29 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param numeric $num
|
2021-12-07 11:52:13 +01:00
|
|
|
* @return ($num is int ? positive-int|0 : ($num is float ? float : positive-int|0|float))
|
2020-04-07 22:48:29 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function abs($num) {}
|
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
|
2021-04-09 17:28:48 +02:00
|
|
|
* ? (TStep is int ? non-empty-list<int> : non-empty-list<float>)
|
2020-04-08 01:59:20 +02:00
|
|
|
* : (
|
|
|
|
* T is float
|
2020-11-28 02:09:53 +01:00
|
|
|
* ? non-empty-list<float>
|
2020-04-08 01:59:20 +02:00
|
|
|
* : (
|
|
|
|
* T is string
|
2020-11-28 02:09:53 +01:00
|
|
|
* ? non-empty-list<string>
|
2020-04-08 01:59:20 +02:00
|
|
|
* : (
|
|
|
|
* T is int|float
|
2020-11-28 02:09:53 +01:00
|
|
|
* ? non-empty-list<int|float>
|
|
|
|
* : non-empty-list<int|float|string>
|
2020-04-08 01:59:20 +02:00
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
*/
|
|
|
|
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
|
2021-06-07 19:19:17 +02:00
|
|
|
* @param-out string|int|float|null $vars
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string, $format) -> return
|
2021-06-07 19:19:17 +02:00
|
|
|
* @return (func_num_args() is 2 ? (null|list<float|int|string|null>) : int)
|
2020-05-11 05:58:51 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function sscanf(string $string, 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
|
|
|
|
* )
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function pathinfo(string $path, int $flags = \PATHINFO_DIRNAME) {}
|
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 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 (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $string is non-empty-string ? non-empty-lowercase-string : lowercase-string
|
2020-05-15 16:18:05 +02:00
|
|
|
* )
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-05-15 16:18:05 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function strtolower(string $string) : string {}
|
2020-05-15 16:18:05 +02:00
|
|
|
|
|
|
|
/**
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-07-15 20:15:08 +02:00
|
|
|
* @return (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $string is non-falsy-string
|
2021-07-15 20:40:18 +02:00
|
|
|
* ? non-falsy-string
|
2021-11-04 10:27:07 +01:00
|
|
|
* : ($string is non-empty-string ? non-empty-string : string)
|
2021-07-15 20:15:08 +02:00
|
|
|
* )
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-05-22 04:47:58 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function strtoupper(string $string) : string {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
2020-11-21 23:35:07 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @param string|array<string> $string
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param string|array<string> $replace
|
|
|
|
* @param int|array<int> $offset
|
2020-11-21 23:35:07 +01:00
|
|
|
* @param null|int|array<int> $length
|
|
|
|
*
|
2020-11-24 16:44:33 +01:00
|
|
|
* @return ($string is array<string> ? array<string> : string)
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string, $replace) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function substr_replace($string, $replace, $offset, $length = null) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
2020-09-01 15:17:57 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-09-01 23:23:26 +02:00
|
|
|
* @param string $haystack
|
|
|
|
*
|
2020-09-01 15:17:57 +02:00
|
|
|
* @psalm-return positive-int|0|false
|
|
|
|
*/
|
2020-09-01 23:23:26 +02:00
|
|
|
function strpos($haystack, $needle, int $offset = 0) : int {}
|
2020-09-01 15:17:57 +02:00
|
|
|
|
2020-06-22 23:53:03 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-10-07 20:10:36 +02:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-06-22 23:53:03 +02:00
|
|
|
*/
|
2021-10-07 20:10:36 +02:00
|
|
|
function trim(string $string, string $characters = " \t\n\r\0\x0B") : string {}
|
2020-06-22 23:53:03 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-10-07 20:10:36 +02:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-06-22 23:53:03 +02:00
|
|
|
*/
|
2021-10-07 20:10:36 +02:00
|
|
|
function ltrim(string $string, string $characters = " \t\n\r\0\x0B") : string {}
|
2020-06-22 23:53:03 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-10-07 20:10:36 +02:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-06-22 23:53:03 +02:00
|
|
|
*/
|
2021-10-07 20:10:36 +02:00
|
|
|
function rtrim(string $string, string $characters = " \t\n\r\0\x0B") : string {}
|
2020-06-22 23:53:03 +02:00
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param string|array $separator
|
|
|
|
* @param array<string|float|int|stringable-object|null|bool> $array
|
2020-05-15 16:18:05 +02:00
|
|
|
*
|
|
|
|
* @return (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $separator is non-empty-string
|
|
|
|
* ? ($array is non-empty-array
|
|
|
|
* ? ($array is array<literal-string|literal-int>
|
|
|
|
* ? ($separator is literal-string ? non-empty-literal-string : non-empty-string)
|
2021-06-15 05:24:09 +02:00
|
|
|
* : non-empty-string
|
|
|
|
* )
|
2020-05-15 16:18:05 +02:00
|
|
|
* : string)
|
|
|
|
* : string
|
|
|
|
* )
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($separator) -> return
|
|
|
|
* @psalm-flow ($array) -(array-fetch)-> return
|
2020-05-15 16:18:05 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function implode($separator, array $array = []) : string {}
|
2020-05-18 23:23:21 +02:00
|
|
|
|
2020-11-16 21:50:07 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param string|array $separator
|
|
|
|
* @param array<string|float|int|stringable-object|null|bool> $array
|
2020-11-16 21:50:07 +01:00
|
|
|
*
|
|
|
|
* @return (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $separator is non-empty-string
|
|
|
|
* ? ($array is non-empty-array
|
|
|
|
* ? ($array is array<literal-string|literal-int>
|
|
|
|
* ? ($separator is literal-string ? non-empty-literal-string : non-empty-string)
|
2021-07-12 22:59:34 +02:00
|
|
|
* : non-empty-string
|
|
|
|
* )
|
2020-11-16 21:50:07 +01:00
|
|
|
* : string)
|
|
|
|
* : string
|
|
|
|
* )
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($separator) -> return
|
|
|
|
* @psalm-flow ($array) -(array-fetch)-> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function join($separator, array $array = []): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-06-22 23:53:03 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -(array-assignment)-> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function explode(string $separator, string $string, int $limit = -1) : array {}
|
2020-06-22 23:53:03 +02:00
|
|
|
|
2020-10-12 19:04:28 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($subject) -(array-assignment)-> return
|
|
|
|
*
|
2020-10-30 18:22:43 +01:00
|
|
|
* @template TFlags as int-mask<0, 1, 2, 4>
|
2020-10-13 02:25:46 +02:00
|
|
|
*
|
|
|
|
* @param TFlags $flags
|
|
|
|
*
|
|
|
|
* @return (TFlags is 0|2 ? non-empty-list<string>|false : (TFlags is 1|3 ? list<string>|false : list<array{string,int}>|false))
|
2020-10-12 19:04:28 +02:00
|
|
|
*
|
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*/
|
|
|
|
function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0) {}
|
|
|
|
|
2020-05-18 23:23:21 +02:00
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array $array
|
2020-05-18 23:23:21 +02:00
|
|
|
*
|
|
|
|
* @return (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $array is array<int>
|
2020-05-22 04:47:58 +02:00
|
|
|
* ? int
|
2021-11-04 10:27:07 +01:00
|
|
|
* : ($array is array<float>
|
2020-05-18 23:23:21 +02:00
|
|
|
* ? float
|
|
|
|
* : float|int
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_sum(array $array) {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
2020-10-06 15:13:19 +02:00
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param array $array
|
2020-10-06 15:13:19 +02:00
|
|
|
*
|
|
|
|
* @return (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $array is array<int>
|
2020-10-06 15:13:19 +02:00
|
|
|
* ? int
|
2021-11-04 10:27:07 +01:00
|
|
|
* : ($array is array<float>
|
2020-10-06 15:13:19 +02:00
|
|
|
* ? float
|
|
|
|
* : float|int
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function array_product(array $array) {}
|
2020-10-06 15:13:19 +02:00
|
|
|
|
2021-09-27 19:34:58 +02:00
|
|
|
/**
|
|
|
|
* 257 is FILTER_VALIDATE_INT
|
|
|
|
* @psalm-taint-escape ($filter is 257 ? 'html' : null)
|
2021-09-27 19:46:01 +02:00
|
|
|
*
|
|
|
|
* 258 is FILTER_VALIDATE_BOOLEAN
|
|
|
|
* @psalm-taint-escape ($filter is 258 ? 'html' : null)
|
|
|
|
*
|
|
|
|
* 259 is FILTER_VALIDATE_FLOAT
|
|
|
|
* @psalm-taint-escape ($filter is 259 ? 'html' : null)
|
|
|
|
*
|
2021-09-27 19:34:58 +02:00
|
|
|
* @psalm-flow ($value, $filter, $options) -> return
|
|
|
|
*/
|
|
|
|
function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {}
|
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-06-22 23:53:03 +02:00
|
|
|
* @psalm-taint-escape html
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-05-22 04:47:58 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function strip_tags(string $string, ?string $allowed_tags = null) : string {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
2020-11-21 23:35:07 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function stripcslashes(string $string) : string {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function stripslashes(string $string) : string {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-06-10 23:43:04 +02:00
|
|
|
* Tainting is handled in a plugin
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function htmlentities(string $string, ?int $flags = null, ?string $encoding = null, bool $double_encode = true) : string {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-06-10 23:43:04 +02:00
|
|
|
* Tainting is handled in a plugin
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function html_entity_decode(string $string, ?int $flags = null, ?string $encoding = null) : string {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-06-10 23:43:04 +02:00
|
|
|
* Tainting is handled in a plugin
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
2021-05-18 01:43:08 +02:00
|
|
|
* @psalm-return (
|
|
|
|
* $string is non-empty-string
|
|
|
|
* ? non-empty-string
|
|
|
|
* : string
|
|
|
|
* )
|
2020-05-22 04:47:58 +02:00
|
|
|
*/
|
2021-05-24 01:12:02 +02:00
|
|
|
function htmlspecialchars(string $string, int $flags = ENT_COMPAT | ENT_HTML401, ?string $encoding = 'UTF-8', bool $double_encode = true) : string {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-06-10 23:43:04 +02:00
|
|
|
* Tainting is handled in a plugin
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function htmlspecialchars_decode(string $string, ?int $flags = null) : string {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
2021-05-19 21:20:56 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2021-06-07 19:19:17 +02:00
|
|
|
*
|
2021-05-19 21:20:56 +02:00
|
|
|
* @psalm-return (
|
2021-12-05 20:35:58 +01:00
|
|
|
* $string is ''
|
|
|
|
* ? 0
|
|
|
|
* : (
|
|
|
|
* $string is non-empty-string
|
|
|
|
* ? positive-int
|
|
|
|
* : (0|positive-int)
|
|
|
|
* )
|
2021-05-19 21:20:56 +02:00
|
|
|
* )
|
|
|
|
*/
|
|
|
|
function strlen(string $string) : int {}
|
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @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) {}
|
|
|
|
|
2020-11-21 23:35:07 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @param string|array<string|int|float> $search
|
|
|
|
* @param string|array<string|int|float> $replace
|
|
|
|
* @param string|array<string|int|float> $subject
|
|
|
|
* @param int $count
|
|
|
|
* @return ($subject is array ? array<string> : string)
|
|
|
|
*
|
|
|
|
* @psalm-flow ($replace, $subject) -> return
|
|
|
|
*/
|
|
|
|
function str_ireplace($search, $replace, $subject, &$count = null) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @return ($string is non-empty-string ? non-empty-string : ($length is positive-int ? non-empty-string: string))
|
2021-07-15 00:54:03 +02:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string, $pad_string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function str_pad(string $string, int $length, $pad_string = '', int $pad_type = STR_PAD_RIGHT): string {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @todo update $times to be `0|positive-int`
|
2021-07-15 00:54:03 +02:00
|
|
|
* @return (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $string is non-empty-string
|
2021-07-15 00:54:03 +02:00
|
|
|
* ? (
|
2021-11-04 10:27:07 +01:00
|
|
|
* $times is positive-int
|
2021-07-15 00:54:03 +02:00
|
|
|
* ? non-empty-string
|
2021-11-04 10:27:07 +01:00
|
|
|
* : ($times is 0 ? '' : string)
|
2021-07-15 00:54:03 +02:00
|
|
|
* )
|
2021-11-04 10:27:07 +01:00
|
|
|
* : ($times is 0 ? '' : string)
|
2021-07-15 00:54:03 +02:00
|
|
|
* )
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function str_repeat(string $string, int $times): string {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function str_rot13(string $string): string {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function str_shuffle(string $string): string {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2021-11-04 10:27:07 +01:00
|
|
|
* @return ($length is positive-int ? list<string> : false)
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function str_split(string $string, int $length = 1) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2020-11-25 17:49:51 +01:00
|
|
|
* @return string|false
|
|
|
|
* @psalm-ignore-falsable-return
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
|
|
|
* @psalm-flow ($haystack) -> return
|
|
|
|
*/
|
2020-11-25 17:49:51 +01:00
|
|
|
function strstr(string $haystack, string $needle, bool $before_needle = false) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2020-11-25 17:49:51 +01:00
|
|
|
* @return string|false
|
|
|
|
* @psalm-ignore-falsable-return
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
|
|
|
* @psalm-flow ($haystack) -> return
|
|
|
|
*/
|
2020-11-25 17:49:51 +01:00
|
|
|
function stristr(string $haystack, string $needle, bool $before_needle = false) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2020-11-24 16:44:33 +01:00
|
|
|
* @return string|false
|
2020-11-25 17:49:51 +01:00
|
|
|
* @psalm-ignore-falsable-return
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
|
|
|
* @psalm-flow ($haystack) -> return
|
|
|
|
*/
|
2020-11-24 16:44:33 +01:00
|
|
|
function strchr(string $haystack, string $needle, bool $before_needle = false) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2020-11-24 16:44:33 +01:00
|
|
|
* @return string|false
|
2020-11-25 17:49:51 +01:00
|
|
|
* @psalm-ignore-falsable-return
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function strpbrk(string $string, string $characters) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2020-11-24 16:44:33 +01:00
|
|
|
* @return string|false
|
2020-11-25 17:49:51 +01:00
|
|
|
* @psalm-ignore-falsable-return
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
|
|
|
* @psalm-flow ($haystack) -> return
|
|
|
|
*/
|
2020-11-25 17:49:51 +01:00
|
|
|
function strrchr(string $haystack, string $needle) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
|
|
|
function strrev(string $string): string {}
|
|
|
|
|
2021-07-09 18:40:55 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-07-09 20:25:12 +02:00
|
|
|
* @param 0|1|2 $format
|
|
|
|
* @return (
|
|
|
|
* $format is 0 ?
|
2021-07-12 22:59:34 +02:00
|
|
|
* int :
|
2021-07-09 20:25:12 +02:00
|
|
|
* (
|
|
|
|
* $format is 1 ?
|
|
|
|
* list<string> :
|
|
|
|
* array<int, string>
|
|
|
|
* )
|
2021-07-09 18:40:55 +02:00
|
|
|
* )
|
|
|
|
*/
|
|
|
|
function str_word_count(string $string, int $format = 0, string|null $characters = null) {}
|
|
|
|
|
2020-11-17 21:15:29 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @param string|string[] $pattern
|
|
|
|
* @param string|array<string|int|float> $replacement
|
|
|
|
* @param string|array<string|int|float> $subject
|
|
|
|
* @param int $count
|
2021-09-07 23:02:28 +02:00
|
|
|
* @return ($subject is array ? array<string> : string|null)
|
2020-11-17 21:15:29 +01:00
|
|
|
*
|
|
|
|
* @psalm-flow ($replacement, $subject) -> return
|
|
|
|
*/
|
|
|
|
function preg_filter($pattern, $replacement, $subject, int $limit = -1, &$count = null) {}
|
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param string|string[] $pattern
|
|
|
|
* @param string|array<string|int|float> $replacement
|
2020-05-30 22:59:18 +02:00
|
|
|
* @param string|array<string|int|float> $subject
|
2020-05-22 04:47:58 +02:00
|
|
|
* @param int $count
|
2020-11-21 23:35:07 +01:00
|
|
|
* @return ($subject is array ? array<string>|null : string|null)
|
2020-05-22 04:47:58 +02:00
|
|
|
*
|
2021-11-04 16:10:59 +01:00
|
|
|
* @psalm-flow ($replacement, $subject) -> return
|
2020-05-22 04:47:58 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function preg_replace($pattern, $replacement, $subject, int $limit = -1, &$count = null) {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
2020-06-23 21:28:31 +02:00
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param string|string[] $pattern
|
|
|
|
* @param callable(string[]):string $callback
|
2020-06-23 21:28:31 +02:00
|
|
|
* @param string|array<string|int|float> $subject
|
|
|
|
* @param int $count
|
2020-11-21 23:35:07 +01:00
|
|
|
* @return ($subject is array ? array<string>|null : string|null)
|
2020-06-23 21:28:31 +02:00
|
|
|
*
|
2020-06-26 14:58:57 +02:00
|
|
|
* @psalm-taint-specialize
|
2020-06-23 21:28:31 +02:00
|
|
|
* @psalm-flow ($subject) -> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function preg_replace_callback($pattern, $callback, $subject, int $limit = -1, &$count = null, int $flags = 0) {}
|
2020-06-23 21:28:31 +02:00
|
|
|
|
2020-09-05 00:10:14 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @template TFlags as int
|
|
|
|
*
|
|
|
|
* @param string $pattern
|
|
|
|
* @param string $subject
|
|
|
|
* @param mixed $matches
|
|
|
|
* @param TFlags $flags
|
2020-09-05 00:31:50 +02:00
|
|
|
* @param-out (
|
|
|
|
* TFlags is 1
|
2020-09-05 00:32:51 +02:00
|
|
|
* ? array<list<string>>
|
|
|
|
* : (TFlags is 2
|
|
|
|
* ? list<array<string>>
|
|
|
|
* : (TFlags is 256|257
|
|
|
|
* ? array<list<array{string, int}>>
|
|
|
|
* : (TFlags is 258
|
|
|
|
* ? list<array<array{string, int}>>
|
|
|
|
* : (TFlags is 512|513
|
|
|
|
* ? array<list<?string>>
|
|
|
|
* : (TFlags is 514
|
|
|
|
* ? list<array<?string>>
|
|
|
|
* : (TFlags is 770
|
2020-09-05 00:35:19 +02:00
|
|
|
* ? list<array<array{?string, int}>>
|
2020-09-05 00:32:51 +02:00
|
|
|
* : array
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* )
|
2020-09-05 00:31:50 +02:00
|
|
|
* ) $matches
|
2020-10-15 01:59:07 +02:00
|
|
|
* @return int|false
|
|
|
|
* @psalm-ignore-falsable-return
|
2020-09-05 00:10:14 +02:00
|
|
|
*/
|
2020-10-26 16:53:03 +01:00
|
|
|
function preg_match_all($pattern, $subject, &$matches = [], int $flags = 1, int $offset = 0) {}
|
2020-09-05 00:10:14 +02:00
|
|
|
|
2021-11-29 14:21:58 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @template TFlags as int-mask<0, 256, 512>
|
|
|
|
*
|
|
|
|
* @param string $pattern
|
|
|
|
* @param string $subject
|
|
|
|
* @param mixed $matches
|
|
|
|
* @param TFlags $flags
|
|
|
|
* @param-out (TFlags is 256 ? array<array-key, array{string, 0|positive-int}|array{'', -1}> :
|
|
|
|
* TFlags is 512 ? array<array-key, string|null> :
|
|
|
|
* TFlags is 768 ? array<array-key, array{string, 0|positive-int}|array{null, -1}> :
|
|
|
|
* array<array-key, string>
|
|
|
|
* ) $matches
|
|
|
|
* @return 1|0|false
|
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*/
|
|
|
|
function preg_match($pattern, $subject, &$matches = [], int $flags = 0, int $offset = 0) {}
|
|
|
|
|
2020-05-22 04:47:58 +02:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-11-16 22:31:25 +01:00
|
|
|
* @return (PHP_MAJOR_VERSION is 5|7 ? string|false : string)
|
2020-05-22 04:47:58 +02:00
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*
|
|
|
|
* @psalm-flow ($string) -> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function substr(string $string, int $offset, ?int $length = null) {}
|
2020-05-22 04:47:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($str) -> return
|
|
|
|
*/
|
|
|
|
function preg_quote(string $str, ?string $delimiter = null) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param string|int|float $values
|
2020-05-22 18:33:04 +02:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($format, $values) -> return
|
2020-05-22 04:47:58 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function sprintf(string $format, ...$values) : string {}
|
2020-05-23 07:11:16 +02:00
|
|
|
|
2020-11-21 23:35:07 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @return string|false
|
|
|
|
* @psalm-ignore-falsable-return
|
2020-11-24 16:44:33 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($format, $values) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function vsprintf(string $format, array $values) {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @return string
|
2020-11-24 16:44:33 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-21 23:35:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function wordwrap(string $string, int $width = 75, string $break = "\n", bool $cut_long_words = false) : string {}
|
2020-11-21 23:35:07 +01:00
|
|
|
|
2020-11-16 21:50:07 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-12-29 12:42:41 +01:00
|
|
|
* @param string|int|float $values
|
2020-11-16 21:50:07 +01:00
|
|
|
*
|
2021-05-24 22:42:18 +02:00
|
|
|
* @psalm-taint-specialize
|
2020-11-16 21:50:07 +01:00
|
|
|
* @psalm-flow ($format, $values) -> return
|
2021-05-24 22:42:18 +02:00
|
|
|
* @psalm-taint-sink html $format
|
|
|
|
* @psalm-taint-sink html $values
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
|
|
|
function printf(string $format, ...$values) : string {}
|
|
|
|
|
2021-11-07 09:25:27 +01:00
|
|
|
/**
|
|
|
|
* @psalm-taint-specialize
|
|
|
|
* @psalm-taint-sink html $format
|
|
|
|
* @psalm-taint-sink html $values
|
|
|
|
*/
|
|
|
|
function vprintf(string $format, array $values) : int {}
|
|
|
|
|
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
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param numeric-string $num1
|
|
|
|
* @param numeric-string $num2
|
|
|
|
* @return (PHP_MAJOR_VERSION is 8 ? numeric-string : ($num2 is "0" ? null : numeric-string))
|
2020-05-30 22:55:55 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function bcdiv(string $num1, string $num2, int $scale = 0): ?string {}
|
2020-07-17 16:12:04 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @param scalar|null|object $value
|
2020-07-17 16:12:04 +02:00
|
|
|
* @return string The string value of var.
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($value) -> return
|
2020-07-17 16:12:04 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function strval ($value): string {}
|
2020-07-22 05:16:56 +02:00
|
|
|
|
|
|
|
/**
|
2021-11-04 10:27:07 +01:00
|
|
|
* @return ($string is non-empty-string ? non-empty-list<string> : non-empty-list<string>|array{null})
|
2020-07-22 05:16:56 +02:00
|
|
|
* @psalm-pure
|
2020-11-21 23:35:07 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-07-22 05:16:56 +02:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function str_getcsv(string $string, string $separator = ',', string $enclosure = '"', string $escape = '\\\\')
|
2020-07-22 05:16:56 +02:00
|
|
|
{
|
|
|
|
}
|
2020-09-17 14:31:31 +02:00
|
|
|
|
2020-10-06 15:13:19 +02:00
|
|
|
/**
|
|
|
|
* @template TKey as array-key
|
2021-12-02 03:51:06 +01:00
|
|
|
* @template TArray as array<mixed, TKey>
|
2020-10-06 15:13:19 +02:00
|
|
|
*
|
2021-12-02 03:51:06 +01:00
|
|
|
* @param TArray $array
|
2020-10-06 15:13:19 +02:00
|
|
|
*
|
2021-12-10 01:45:58 +01:00
|
|
|
* @return (TArray is non-empty-array ? non-empty-array<TKey, positive-int> : array<TKey, positive-int>)
|
2020-10-06 15:13:19 +02:00
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
function array_count_values(array $array): array {}
|
2020-11-16 21:50:07 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function addcslashes(string $string, string $characters) : string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function addslashes(string $string): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function ucfirst(string $string): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string, $separators) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function ucwords (string $string, string $separators = " \t\r\n\f\v"): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function lcfirst(string $string): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function nl2br(string $string, bool $use_xhtml = false): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function quoted_printable_decode(string $string): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function quoted_printable_encode(string $string): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function quotemeta(string $string): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function chop(string $string, string $characters = " \t\n\r\0\x0B"): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string, $separator) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function chunk_split(string $string, int $length = 76, string $separator= ''): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function convert_uudecode(string $string): string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-16 21:50:07 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function convert_uuencode(string $string) : string
|
2020-11-16 21:50:07 +01:00
|
|
|
{
|
|
|
|
}
|
2020-11-18 17:39:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-taint-escape ldap
|
|
|
|
* @psalm-flow ($value) -> return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function ldap_escape(string $value, string $ignore = "", int $flags = 0) : string {}
|
2020-11-22 18:09:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
* @psalm-flow ($json) -> return
|
|
|
|
*/
|
|
|
|
function json_decode(string $json, ?bool $associative = null, int $depth = 512, int $flags = 0) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-03-18 14:41:44 +01:00
|
|
|
* @return ($flags is 4194304 ? string : string|false)
|
2020-11-22 18:09:55 +01:00
|
|
|
*
|
|
|
|
* @psalm-flow ($value) -> return
|
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*/
|
|
|
|
function json_encode(mixed $value, int $flags = 0, int $depth = 512) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @return string|false
|
|
|
|
*
|
|
|
|
* @psalm-flow ($values) -> return
|
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*/
|
|
|
|
function pack(string $format, mixed ...$values) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @param string|int $in_codepage
|
|
|
|
* @param string|int $out_codepage
|
|
|
|
* @psalm-flow ($subject) -> return
|
|
|
|
*/
|
|
|
|
function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @psalm-flow ($prefix) -> return
|
|
|
|
*/
|
|
|
|
function uniqid(string $prefix = "", bool $more_entropy = false) : string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-05-06 20:32:17 +02:00
|
|
|
* @return array|false
|
|
|
|
* @psalm-ignore-falsable-return
|
2020-11-22 18:09:55 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-22 18:09:55 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function unpack(string $format, string $string, int $offset = 0) {}
|
2020-11-22 18:09:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @return string|false
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-22 18:09:55 +01:00
|
|
|
* @psalm-ignore-falsable-return
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function base64_decode(string $string, bool $strict = false) {}
|
2020-11-22 18:09:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @psalm-flow ($string) -> return
|
2020-11-22 18:09:55 +01:00
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function base64_encode(string $string) : string {}
|
2020-11-22 18:09:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2020-12-04 05:14:43 +01:00
|
|
|
* @param resource|null $context
|
2020-11-22 18:09:55 +01:00
|
|
|
*
|
2021-11-04 10:27:07 +01:00
|
|
|
* @return ($associative is 0 ? list<string> : array<string, string|list<string>>)|false
|
2021-07-29 20:50:13 +02:00
|
|
|
*
|
2020-11-22 18:09:55 +01:00
|
|
|
* @psalm-taint-sink ssrf $url
|
|
|
|
*/
|
2021-11-04 10:27:07 +01:00
|
|
|
function get_headers(string $url, int $associative = 0, $context = null) : array|false {}
|
2020-11-22 18:09:55 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
2021-07-29 20:50:13 +02:00
|
|
|
* @return array<lowercase-string, string>|false
|
|
|
|
*
|
2020-11-22 18:09:55 +01:00
|
|
|
* @psalm-taint-sink ssrf $filename
|
|
|
|
*/
|
2021-07-29 20:50:13 +02:00
|
|
|
function get_meta_tags(string $filename, bool $use_include_path = false) : array|false {}
|
2021-07-15 23:39:16 +02:00
|
|
|
|
|
|
|
/**
|
2021-07-15 23:47:00 +02:00
|
|
|
* @return ($categorize is false ? array<string,int|string|float|bool|null|array|resource> : array<string, array<string,int|string|float|bool|null|array|resource>>)
|
2021-07-15 23:39:16 +02:00
|
|
|
*/
|
2021-07-15 23:47:00 +02:00
|
|
|
function get_defined_constants(bool $categorize = false): array {}
|
2021-10-12 20:13:04 +02:00
|
|
|
|
|
|
|
/**
|
2021-10-13 10:33:26 +02:00
|
|
|
* @param mixed $object_or_class
|
|
|
|
* @param class-string $class
|
2021-10-28 20:08:43 +02:00
|
|
|
* @return ($allow_string is false ? ($object_or_class is object ? bool : false) : bool)
|
2021-10-12 20:13:04 +02:00
|
|
|
*/
|
2021-11-13 22:13:55 +01:00
|
|
|
function is_a($object_or_class, string $class, $allow_string = false): bool{}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @template T of array|string
|
|
|
|
* @param T $string
|
2021-11-14 10:36:03 +01:00
|
|
|
* @return (T is array<int, string> ? array<int, string> : T is array ? array : string|false)
|
2021-11-14 10:59:24 +01:00
|
|
|
* @psalm-ignore-falsable-return
|
2021-11-13 22:13:55 +01:00
|
|
|
*/
|
|
|
|
function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false{}
|
2022-03-11 08:52:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @template TRead of null|array<array-key, resource>
|
|
|
|
* @template TWrite of null|array<array-key, resource>
|
|
|
|
* @template TExcept of null|array<array-key, resource>
|
|
|
|
* @param TRead $read
|
|
|
|
* @param TWrite $write
|
|
|
|
* @param TExcept $except
|
|
|
|
* @return false|int<0, max>
|
|
|
|
* @param-out (TRead is null ? null : array<array-key, resource>) $read
|
|
|
|
* @param-out (TWrite is null ? null : array<array-key, resource>) $write
|
|
|
|
* @param-out (TExcept is null ? null : array<array-key, resource>) $except
|
|
|
|
* @psalm-suppress ReferenceConstraintViolation
|
|
|
|
*/
|
|
|
|
function stream_select(null|array &$read, null|array &$write, null|array &$except, null|int $seconds, null|int $microseconds = null) : bool|int {}
|