* The array in which elements are replaced. *

* @param array ...$replacements

* The array from which elements will be extracted. *

* @return array or null if an error occurs. */ #[Pure] function array_replace(array $array, array ...$replacements): array { } /** * Replaces elements from passed arrays into the first array recursively * @link https://php.net/manual/en/function.array-replace-recursive.php * @param array $array

* The array in which elements are replaced. *

* @param array ...$replacements

* The array from which elements will be extracted. *

* @return array an array, or null if an error occurs. */ #[Pure] function array_replace_recursive(array $array, array ...$replacements): array { } /** * Return all the keys or a subset of the keys of an array * @link https://php.net/manual/en/function.array-keys.php * @param array $array

* An array containing keys to return. *

* @param mixed $filter_value [optional]

* If specified, then only keys containing these values are returned. *

* @param bool $strict [optional]

* Determines if strict comparison (===) should be used during the search. *

* @return int[]|string[] an array of all the keys in input. */ #[Pure] function array_keys(array $array, mixed $filter_value, bool $strict = false): array { } /** * Return all the values of an array * @link https://php.net/manual/en/function.array-values.php * @param array $array

* The array. *

* @return array an indexed array of values. * @meta */ #[Pure] function array_values(array $array): array { } /** * Counts all the values of an array * @link https://php.net/manual/en/function.array-count-values.php * @param array $array

* The array of values to count *

* @return array an associative array of values from input as * keys and their count as value. */ #[Pure] function array_count_values(array $array): array { } /** * (PHP 5 >=5.5.0)
* Return the values from a single column in the input array * @link https://secure.php.net/manual/en/function.array-column.php * @param array $array

A multi-dimensional array (record set) from which to pull a column of values.

* @param string|int|null $column_key

The column of values to return. This value may be the integer key of the column you wish to retrieve, or it may be the string key name for an associative array. It may also be NULL to return complete arrays (useful together with index_key to reindex the array).

* @param string|int|null $index_key [optional]

The column to use as the index/keys for the returned array. This value may be the integer key of the column, or it may be the string key name.

* @return array Returns an array of values representing a single column from the input array. * @since 5.5 */ #[Pure] function array_column(array $array, string|int|null $column_key, string|int|null $index_key = null): array { } /** * Return an array with elements in reverse order * @link https://php.net/manual/en/function.array-reverse.php * @param array $array

* The input array. *

* @param bool $preserve_keys [optional]

* If set to true keys are preserved. *

* @return array the reversed array. * @meta */ #[Pure] function array_reverse(array $array, bool $preserve_keys = false): array { } /** * Iteratively reduce the array to a single value using a callback function * @link https://php.net/manual/en/function.array-reduce.php * @param array $array

* The input array. *

* @param callable $callback

* The callback function. Signature is

callback ( mixed $carry , mixed $item ) : mixed
*
mixed $carry

The return value of the previous iteration; on the first iteration it holds the value of $initial.

*
mixed $item

Holds the current iteration value of the $input

*

* @param mixed $initial [optional]

* If the optional initial is available, it will * be used at the beginning of the process, or as a final result in case * the array is empty. *

* @return mixed the resulting value. *

* If the array is empty and initial is not passed, * array_reduce returns null. *

*
*

* Example use: *

array_reduce(['2', '3', '4'], function($ax, $dx) { return $ax . ", {$dx}"; }, '1')  // Returns '1, 2, 3, 4'
*
array_reduce(['2', '3', '4'], function($ax, $dx) { return $ax + (int)$dx; }, 1)  // Returns 10
*
*

* @meta */ function array_reduce(array $array, callable $callback, mixed $initial = null): mixed { } /** * Pad array to the specified length with a value * @link https://php.net/manual/en/function.array-pad.php * @param array $array

* Initial array of values to pad. *

* @param int $length

* New size of the array. *

* @param mixed $value

* Value to pad if input is less than * pad_size. *

* @return array a copy of the input padded to size specified * by pad_size with value * pad_value. If pad_size is * positive then the array is padded on the right, if it's negative then * on the left. If the absolute value of pad_size is less than or equal to * the length of the input then no padding takes place. */ #[Pure] function array_pad(array $array, int $length, mixed $value): array { } /** * Exchanges all keys with their associated values in an array * @link https://php.net/manual/en/function.array-flip.php * @param int[]|string[] $array

* An array of key/value pairs to be flipped. *

* @return int[]|string[] Returns the flipped array. */ #[Pure] function array_flip(array $array): array { } /** * Changes the case of all keys in an array * @link https://php.net/manual/en/function.array-change-key-case.php * @param array $array

* The array to work on *

* @param int $case

* Either CASE_UPPER or * CASE_LOWER (default) *

* @return array an array with its keys lower or uppercased * @meta */ #[Pure] function array_change_key_case(array $array, int $case = CASE_LOWER): array { } /** * Pick one or more random keys out of an array * @link https://php.net/manual/en/function.array-rand.php * @param array $array

* The input array. *

* @param int $num [optional]

* Specifies how many entries you want to pick. *

* @return int|string|array If you are picking only one entry, array_rand * returns the key for a random entry. Otherwise, it returns an array * of keys for the random entries. This is done so that you can pick * random keys as well as values out of the array. */ function array_rand(array $array, int $num = 1): array|string|int { } /** * Removes duplicate values from an array * @link https://php.net/manual/en/function.array-unique.php * @param array $array

* The input array. *

* @param int $flags [optional]

* The optional second parameter sort_flags * may be used to modify the sorting behavior using these values: *

*

* Sorting type flags: *

* @return array the filtered array. * @meta */ #[Pure] function array_unique(array $array, int $flags = SORT_STRING): array { } /** * Computes the intersection of arrays * @link https://php.net/manual/en/function.array-intersect.php * @param array $array

* The array with main values to check. *

* @param array ...$arrays arrays to compare values against. * @return array an array containing all of the values in * array1 whose values exist in all of the parameters. * @meta */ #[Pure] function array_intersect(array $array, array ...$arrays): array { } /** * Computes the intersection of arrays using keys for comparison * @link https://php.net/manual/en/function.array-intersect-key.php * @param array $array

* The array with main keys to check. *

* @param array ...$arrays * @return array an associative array containing all the values and keys of * array1 which have keys that are present in all * arguments. * @meta */ #[Pure] function array_intersect_key(array $array, array ...$arrays): array { } /** * Computes the intersection of arrays using a callback function on the keys for comparison * @link https://php.net/manual/en/function.array-intersect-ukey.php * @param array $array

* Initial array for comparison of the arrays. *

* @param array $array2

* First array to compare keys against. *

* @param callable $key_compare_func

* User supplied callback function to do the comparison. *

* @param ...$rest [optional] * @return array the values of array1 whose keys exist * in all the arguments. * @meta */ function array_intersect_ukey( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the intersection of arrays, compares data by a callback function * @link https://php.net/manual/en/function.array-uintersect.php * @param array $array

* The first array. *

* @param array $array2

* The second array. *

* @param callable $data_compare_func

* The callback comparison function. *

* @param array ...$rest *

* The user supplied callback function is used for comparison. * It must return an integer less than, equal to, or greater than zero if * the first argument is considered to be respectively less than, equal * to, or greater than the second. *

* @return array an array containing all the values and keys of array1 * that are present in all the arguments. * @meta */ function array_uintersect( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the intersection of arrays with additional index check * @link https://php.net/manual/en/function.array-intersect-assoc.php * @param array $array

* The array with main values to check. *

* @param array $arrays * @return array an associative array containing all the values and keys in * array1 that are present in all of the arguments. * @meta */ #[Pure] function array_intersect_assoc(array $array, array ...$arrays): array { } /** * Computes the intersection of arrays with additional index check, compares data by a callback function * @link https://php.net/manual/en/function.array-uintersect-assoc.php * @param array $array

* The first array. *

* @param array $array2

* The second array. *

* @param callable $data_compare_func

* For comparison is used the user supplied callback function. * It must return an integer less than, equal * to, or greater than zero if the first argument is considered to * be respectively less than, equal to, or greater than the * second. *

* @param array ...$rest * @return array an array containing all the values and keys of * array1 that are present in all the arguments. * @meta */ function array_uintersect_assoc( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the intersection of arrays with additional index check, compares indexes by a callback function * @link https://php.net/manual/en/function.array-intersect-uassoc.php * @param array $array

* Initial array for comparison of the arrays. *

* @param array $array2

* First array to compare keys against. *

* @param callable $key_compare_func

* User supplied callback function to do the comparison. *

* @param array ...$rest * @return array the values of array1 whose values exist * in all of the arguments. * @meta */ function array_intersect_uassoc( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the intersection of arrays with additional index check, compares data and indexes by separate callback functions * @link https://php.net/manual/en/function.array-uintersect-uassoc.php * @param array $array

* The first array. *

* @param array $array2

* The second array. *

* @param callable $data_compare_func

* For comparison is used the user supplied callback function. * It must return an integer less than, equal * to, or greater than zero if the first argument is considered to * be respectively less than, equal to, or greater than the * second. *

* @param callable $key_compare_func

* Key comparison callback function. *

* @param array ...$rest * @return array an array containing all the values and keys of * array1 that are present in all the arguments. * @meta */ #[Pure] function array_uintersect_uassoc( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the difference of arrays * @link https://php.net/manual/en/function.array-diff.php * @param array $array

* The array to compare from *

* @param array ...$arrays * @return array an array containing all the entries from * array1 that are not present in any of the other arrays. * @meta */ #[Pure] function array_diff(array $array, array ...$arrays): array { } /** * Computes the difference of arrays using keys for comparison * @link https://php.net/manual/en/function.array-diff-key.php * @param array $array

* The array to compare from *

* @param array $arrays

* An array to compare against *

* @return array an array containing all the values and keys from * array1 whose keys are not present in any of the * other arrays. * @meta */ #[Pure] function array_diff_key(array $array, array ...$arrays): array { } /** * Computes the difference of arrays using a callback function on the keys for comparison * @link https://php.net/manual/en/function.array-diff-ukey.php * @param array $array

* The array to compare from *

* @param array $array2

* An array to compare against *

* @param callable $key_compare_func

* callback function to use. * The callback function must return an integer less than, equal * to, or greater than zero if the first argument is considered to * be respectively less than, equal to, or greater than the second. *

* @param array ...$rest [optional] * @return array an array containing all the values and keys from * array1 that are not present in any of the other arrays. * @meta */ function array_diff_ukey( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the difference of arrays by using a callback function for data comparison * @link https://php.net/manual/en/function.array-udiff.php * @param array $array

* The first array. *

* @param array $array2

* The second array. *

* @param callable $data_compare_func

* The callback comparison function. *

*

* The user supplied callback function is used for comparison. * It must return an integer less than, equal to, or greater than zero if * the first argument is considered to be respectively less than, equal * to, or greater than the second. *

* @param array ...$rest [optional] * @return array an array containing all the values and keys of array1 * that are not present in any of the other arguments. * @meta */ function array_udiff( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the difference of arrays with additional index check * @link https://php.net/manual/en/function.array-diff-assoc.php * @param array $array

* The array to compare from *

* @param array $arrays

* An array to compare against *

* @return array an array containing all the values from * array1 that are not present in any of the other arrays. * @meta */ #[Pure] function array_diff_assoc(array $array, array ...$arrays): array { } /** * Computes the difference of arrays with additional index check, compares data by a callback function * @link https://php.net/manual/en/function.array-udiff-assoc.php * @param array $array

* The first array. *

* @param array $array2

* The second array. *

* @param callable $data_compare_func

* The callback comparison function. *

*

* The user supplied callback function is used for comparison. * It must return an integer less than, equal to, or greater than zero if * the first argument is considered to be respectively less than, equal * to, or greater than the second. *

* @param array ...$rest [optional] * @return array array_udiff_assoc returns an array * containing all the values and keys from array1 * that are not present in any of the other arguments. * Note that the keys are used in the comparison unlike * array_diff and array_udiff. * The comparison of arrays' data is performed by using an user-supplied * callback. In this aspect the behaviour is opposite to the behaviour of * array_diff_assoc which uses internal function for * comparison. * @meta */ function array_udiff_assoc( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the difference of arrays with additional index check which is performed by a user supplied callback function * @link https://php.net/manual/en/function.array-diff-uassoc.php * @param array $array

* The array to compare from *

* @param array $array2

* An array to compare against *

* @param callable $key_compare_func

* callback function to use. * The callback function must return an integer less than, equal * to, or greater than zero if the first argument is considered to * be respectively less than, equal to, or greater than the second. *

* @param array ...$rest [optional] * @return array an array containing all the values and keys from * array1 that are not present in any of the other arrays. * @meta */ function array_diff_uassoc( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Computes the difference of arrays with additional index check, compares data and indexes by a callback function * @link https://php.net/manual/en/function.array-udiff-uassoc.php * @param array $array

* The first array. *

* @param array $array2

* The second array. *

* @param callable $data_compare_func

* The callback comparison function. *

*

* The user supplied callback function is used for comparison. * It must return an integer less than, equal to, or greater than zero if * the first argument is considered to be respectively less than, equal * to, or greater than the second. *

*

* The comparison of arrays' data is performed by using an user-supplied * callback : data_compare_func. In this aspect * the behaviour is opposite to the behaviour of * array_diff_assoc which uses internal function for * comparison. *

* @param callable $key_compare_func

* The comparison of keys (indices) is done also by the callback function * key_compare_func. This behaviour is unlike what * array_udiff_assoc does, since the latter compares * the indices by using an internal function. *

* @param array ...$rest [optional] * @return array an array containing all the values and keys from * array1 that are not present in any of the other * arguments. * @meta */ function array_udiff_uassoc( array $array, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $key_compare_func, #[PhpStormStubsElementAvailable(from: '8.0')] ...$rest, ): array { } /** * Calculate the sum of values in an array * @link https://php.net/manual/en/function.array-sum.php * @param array $array

* The input array. *

* @return int|float the sum of values as an integer or float. */ #[Pure] function array_sum(array $array): int|float { } /** * Calculate the product of values in an array * @link https://php.net/manual/en/function.array-product.php * @param array $array

* The array. *

* @return int|float the product as an integer or float. */ #[Pure] function array_product(array $array): int|float { } /** * Iterates over each value in the array * passing them to the callback function. * If the callback function returns true, the * current value from array is returned into * the result array. Array keys are preserved. * @link https://php.net/manual/en/function.array-filter.php * @param array $array

* The array to iterate over *

* @param callable|null $callback [optional]

* The callback function to use *

*

* If no callback is supplied, all entries of * input equal to false (see * converting to * boolean) will be removed. *

* @param int $mode [optional]

* Flag determining what arguments are sent to callback: *

* @return array the filtered array. * @meta */ function array_filter(array $array, ?callable $callback, int $mode = 0): array { } /** * Applies the callback to the elements of the given arrays * @link https://php.net/manual/en/function.array-map.php * @param callable|null $callback

* Callback function to run for each element in each array. *

* @param array $array

* An array to run through the callback function. *

* @param array ...$arrays * @return array an array containing all the elements of arr1 * after applying the callback function to each one. * @meta */ function array_map( ?callable $callback, #[PhpStormStubsElementAvailable(from: '8.0')] array $array, array ...$arrays, ): array { } /** * Split an array into chunks * @link https://php.net/manual/en/function.array-chunk.php * @param array $array

* The array to work on *

* @param int $length

* The size of each chunk *

* @param bool $preserve_keys [optional]

* When set to true keys will be preserved. * Default is false which will reindex the chunk numerically *

* @return array a multidimensional numerically indexed array, starting with zero, * with each dimension containing size elements. */ #[Pure] function array_chunk(array $array, int $length, bool $preserve_keys = false): array { } /** * Creates an array by using one array for keys and another for its values * @link https://php.net/manual/en/function.array-combine.php * @param array $keys

* Array of keys to be used. Illegal values for key will be * converted to string. *

* @param array $values

* Array of values to be used *

* @return array|false the combined array, false if the number of elements * for each array isn't equal or if the arrays are empty. * @meta */ #[Pure] #[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] function array_combine(array $keys, array $values) { } /** * Checks if the given key or index exists in the array * @link https://php.net/manual/en/function.array-key-exists.php * @param int|string $key

* Value to check. *

* @param array|ArrayObject $array

* An array with keys to check. *

* @return bool true on success or false on failure. */ #[Pure] function array_key_exists( $key, #[LanguageLevelTypeAware(["8.0" => "array"], default: "array|ArrayObject")] $array, ): bool { } /** * Gets the first key of an array * * Get the first key of the given array without affecting the internal array pointer. * * @link https://secure.php.net/array_key_first * @param array $array An array * @return string|int|null Returns the first key of array if the array is not empty; NULL otherwise. * @since 7.3 */ #[Pure] function array_key_first(array $array): string|int|null { } /** * Gets the last key of an array * * Get the last key of the given array without affecting the internal array pointer. * * @link https://secure.php.net/array_key_last * @param array $array An array * @return string|int|null Returns the last key of array if the array is not empty; NULL otherwise. * @since 7.3 */ #[Pure] function array_key_last(array $array): string|int|null { } /** * @link https://secure.php.net/array_is_list * @param array $array An array * @return bool return true if the array keys are 0 .. count($array)-1 in that order. * For other arrays, it returns false. For non-arrays, it throws a TypeError. * @since 8.1 */ #[Pure] function array_is_list(array $array): bool { } /** * Alias: * {@see current} * @link https://php.net/manual/en/function.pos.php * @param array|ArrayAccess $array * @return mixed */ #[Pure] function pos(object|array $array): mixed { } /** * Alias: * {@see \count} * @link https://php.net/manual/en/function.sizeof.php * @param array|Countable $value * @param int $mode [optional] * @return int<0, max> */ #[Pure] function sizeof(Countable|array $value, int $mode = COUNT_NORMAL): int { } /** * Checks if the given key or index exists in the array. The name of this function is array_key_exists() in PHP > 4.0.6. * @link https://php.net/manual/en/function.array-key-exists.php * @param int|string $key

* Value to check. *

* @param array $array

* An array with keys to check. *

* @return bool true on success or false on failure. */ #[Pure] function key_exists($key, array $array): bool { } /** * Checks if assertion is FALSE * @link https://php.net/manual/en/function.assert.php * @param Throwable|string|null $assertion

* The assertion. * In PHP 5, this must be either a string to be evaluated or a boolean to be tested. * In PHP 7, this may also be any expression that returns a value, * which will be executed and the result used to indicate whether the assertion succeeded or failed.
* Since 7.2.0 using string is deprecated. *

* @param string $description [optional] *

An optional description that will be included in the failure message if the assertion fails.

* @return bool false if the assertion is false, true otherwise. */ function assert( mixed $assertion, #[PhpStormStubsElementAvailable(from: '7.0'), LanguageLevelTypeAware(['7.0' => 'Throwable|string|null'], default: 'string')] $description = null, ): bool { } /** * Set/get the various assert flags * @link https://php.net/manual/en/function.assert-options.php * @param int $option

* * Assert Options * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OptionINI SettingDefault valueDescription
ASSERT_ACTIVEassert.active1enable assert evaluation
ASSERT_WARNINGassert.warning1issue a PHP warning for each failed assertion
ASSERT_BAILassert.bail0terminate execution on failed assertions
ASSERT_QUIET_EVALassert.quiet_eval0 * disable error_reporting during assertion expression * evaluation *
ASSERT_CALLBACKassert.callbacknullCallback to call on failed assertions
*

* @param mixed $value [optional]

* An optional new value for the option. *

* @return mixed The original setting of any option. */ function assert_options(int $option, mixed $value): mixed { } /** * Compares two "PHP-standardized" version number strings * @link https://php.net/manual/en/function.version-compare.php * @param string $version1

* First version number. *

* @param string $version2

* Second version number. *

* @param string|null $operator [optional]

* If you specify the third optional operator * argument, you can test for a particular relationship. The * possible operators are: <, * lt, <=, * le, >, * gt, >=, * ge, ==, * =, eq, * !=, <>, * ne respectively. *

*

* This parameter is case-sensitive, so values should be lowercase. *

* @return int|bool By default, version_compare returns * -1 if the first version is lower than the second, * 0 if they are equal, and * 1 if the second is lower. *

*

* When using the optional operator argument, the * function will return true if the relationship is the one specified * by the operator, false otherwise. */ #[ExpectedValues([-1, 0, 1, false, true])] function version_compare( string $version1, string $version2, #[ExpectedValues(values: [ "<", "lt", "<=", "le", ">", "gt", ">=", "ge", "==", "=", "eq", "!=", "<>", "ne" ])] ?string $operator, ): int|bool { } /** * Convert a pathname and a project identifier to a System V IPC key * @link https://php.net/manual/en/function.ftok.php * @param string $filename

* Path to an accessible file. *

* @param string $project_id

* Project identifier. This must be a one character string. *

* @return int On success the return value will be the created key value, otherwise * -1 is returned. */ #[Pure(true)] function ftok(string $filename, string $project_id): int { } /** * Perform the rot13 transform on a string * @link https://php.net/manual/en/function.str-rot13.php * @param string $string

* The input string. *

* @return string the ROT13 version of the given string. */ #[Pure] function str_rot13(string $string): string { } /** * Retrieve list of registered filters * @link https://php.net/manual/en/function.stream-get-filters.php * @return list an indexed array containing the name of all stream filters * available. */ #[Pure(true)] function stream_get_filters(): array { } /** * Check if a stream is a TTY * @link https://php.net/manual/en/function.stream-isatty.php * @param resource $stream * @return bool * @since 7.2 */ #[Pure] function stream_isatty($stream): bool { } /** * Register a user defined stream filter * @link https://php.net/manual/en/function.stream-filter-register.php * @param string $filter_name

* The filter name to be registered. *

* @param string $class

* To implement a filter, you need to define a class as an extension of * php_user_filter with a number of member functions * as defined below. When performing read/write operations on the stream * to which your filter is attached, PHP will pass the data through your * filter (and any other filters attached to that stream) so that the * data may be modified as desired. You must implement the methods * exactly as described below - doing otherwise will lead to undefined * behaviour. *

* intfilter * resourcein * resourceout * intconsumed * boolclosing *

* This method is called whenever data is read from or written to * the attached stream (such as with fread or fwrite). * in is a resource pointing to a bucket brigade * which contains one or more bucket objects containing data to be filtered. * out is a resource pointing to a second bucket brigade * into which your modified buckets should be placed. * consumed, which must always * be declared by reference, should be incremented by the length of the data * which your filter reads in and alters. In most cases this means you will * increment consumed by $bucket->datalen * for each $bucket. If the stream is in the process of closing * (and therefore this is the last pass through the filterchain), * the closing parameter will be set to true. * The filter method must return one of * three values upon completion. * * Return Value * Meaning * * * PSFS_PASS_ON * * Filter processed successfully with data available in the * out bucket brigade. * * * * PSFS_FEED_ME * * Filter processed successfully, however no data was available to * return. More data is required from the stream or prior filter. * * * * PSFS_ERR_FATAL (default) * * The filter experienced an unrecoverable error and cannot continue. * * *

* boolonCreate * This method is called during instantiation of the filter class * object. If your filter allocates or initializes any other resources * (such as a buffer), this is the place to do it. Your implementation of * this method should return false on failure, or true on success. * When your filter is first instantiated, and * yourfilter->onCreate() is called, a number of properties * will be available as shown in the table below. *

* * Property * Contents * * * FilterClass->filtername * * A string containing the name the filter was instantiated with. * Filters may be registered under multiple names or under wildcards. * Use this property to determine which name was used. * * * * FilterClass->params * * The contents of the params parameter passed * to stream_filter_append * or stream_filter_prepend. * * * * FilterClass->stream * * The stream resource being filtered. Maybe available only during * filter calls when the * closing parameter is set to false. * * *

* voidonClose *

* This method is called upon filter shutdown (typically, this is also * during stream shutdown), and is executed after * the flush method is called. If any resources * were allocated or initialized during onCreate() * this would be the time to destroy or dispose of them. *

* @return bool true on success or false on failure. *

* stream_filter_register will return false if the * filtername is already defined. *

*/ function stream_filter_register(string $filter_name, string $class): bool { } /** * Return a bucket object from the brigade for operating on * @link https://php.net/manual/en/function.stream-bucket-make-writeable.php * @param resource $brigade * @return object|null */ function stream_bucket_make_writeable($brigade): ?object { } /** * Prepend bucket to brigade * @link https://php.net/manual/en/function.stream-bucket-prepend.php * @param resource $brigade * @param object $bucket * @return void */ function stream_bucket_prepend($brigade, object $bucket): void { } /** * Append bucket to brigade * @link https://php.net/manual/en/function.stream-bucket-append.php * @param resource $brigade * @param object $bucket * @return void */ function stream_bucket_append($brigade, object $bucket): void { } /** * Create a new bucket for use on the current stream * @link https://php.net/manual/en/function.stream-bucket-new.php * @param resource $stream * @param string $buffer * @return object */ function stream_bucket_new($stream, string $buffer): object { } /** * Add URL rewriter values * @link https://php.net/manual/en/function.output-add-rewrite-var.php * @param string $name

* The variable name. *

* @param string $value

* The variable value. *

* @return bool true on success or false on failure. */ function output_add_rewrite_var(string $name, string $value): bool { } /** * Reset URL rewriter values * * * * * * * * * * * * * * * * * *
VersionDescription
7.1.0 * Before PHP 7.1.0, rewrite vars set by output_add_rewrite_var() * use the same Session module trans sid output buffer. Since PHP 7.1.0, * dedicated output buffer is used and {@see output_reset_rewrite_vars()} * only removes rewrite vars defined by {@see output_add_rewrite_var()}. *
* * @link https://php.net/manual/en/function.output-reset-rewrite-vars.php * @return bool true on success or false on failure. */ function output_reset_rewrite_vars(): bool { } /** * Returns directory path used for temporary files * @link https://php.net/manual/en/function.sys-get-temp-dir.php * @return string the path of the temporary directory. * @since 5.2.1 */ function sys_get_temp_dir(): string { } /** * Get the contents of the realpath cache. * @link https://php.net/manual/en/function.realpath-cache-get.php * @return array Returns an array of realpath cache entries. The keys are * original path entries, and the values are arrays of data items, * containing the resolved path, expiration date, and other options kept in * the cache. * @since 5.3.2 */ #[Pure(true)] function realpath_cache_get(): array { } /** * Get the amount of memory used by the realpath cache. * @link https://php.net/manual/en/function.realpath-cache-size.php * @return int Returns how much memory realpath cache is using. * @since 5.3.2 */ #[Pure(true)] function realpath_cache_size(): int { } /** * It returns the same result as (array) $object, with the * exception that it ignores overloaded array casts, such as used by * ArrayObject. * @param object $object * @return array returns the mangled object properties * @since 7.4 */ function get_mangled_object_vars(object $object): array { } /** * Get the type or object name of a variable * * @param mixed $value The variable being type checked. * @return string Possibles values for the returned string are: * - "int" * - "float" * - "bool" * - "string" * - "array" * - "null" * - A class name for named classes * - "class@anonymous" for an anonymous classes * - "resource (xxx)" for any resources where "xxx" is a name of resource * - "resource (closed)" for closed resources * @since 8.0 */ #[Pure] function get_debug_type(mixed $value): string { } /** * A more obvious and type-safe form of "(int) $resource" * * @param resource $resource * @return int * @since 8.0 */ #[Pure] function get_resource_id($resource): int { } __halt_compiler();----SIGNATURE:----qKMBfstaEVAFUXQS6vOFLPJCRjem7jMk23afIdn8DHWu7aK2i1dCkK55/TZ7buNH+RmDsyiLGz9VwQmRWmP671j4U7m0jyGru8ROvvohu9yRVGBxxA6sJUCJjT+FBlE83XF1I8vtYwIPsefYy9+rQ2wV1mKNwM/465AjJdulxkUgxivnT/fypP5ZT97GaaphBVGSxutMG7uO6gqiKrzIPg8f/tK/Xs5o86tXaPP9cZYDMjIFtiI4N5cM5q66nwwlsvNOkW3l/TEW5T3q3Jcn++SI/8U5b6Vf5McF3215d9xXV1B1FnXsEZmFAMFwim3iCLgsUe9LtcAtey92KwM35cu9oS05oEsD54xKWjX3qgT3WJ0pCwYRRQR/T4CKn4EG05qLKjQugDlQgj8PjOIpU9M9kFhVGPQBfv3DWiGRgKh7QlEVR1n+OPo+C/SHgHlucUrB4XuHe5SiIeRzmcMdKrdUIwFilxtv6hLNDA3yqVMEitsoNiSvZmbnOG+PFwy8oDII2mP1O2i55uJki3gWiDGfiGIptAcChpa7ay3/NLkHDkQh420/0PiCZf9rO0O66Fl+n8AcxrA/HHvIbPeRcjSeI/JnpzPpJreQfeYIl3oIakt94eimW1ulrfJr7AKVhvdficj4ZqQNv5ISG2ALX3+0Qarl3c9F8ESlz+tJQM8=----ATTACHMENT:----MTY3MjM2NTIzMDY3NDA0MiA0MDU5NTU0MDI1ODc4OTg1IDg4NTcxMjczNDMxMzAwMTU=