From 016afa5d6494a18a95822437ab529e57088a07eb Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
A GMP number representing the upper bound for the random number
* @return GMP A random GMP number. */ -#[Pure] +#[Pure(true)] function gmp_random_range(GMP|string|int $min, GMP|string|int $max): GMP {} /** @@ -511,7 +511,7 @@ function gmp_sign(GMP|string|int $num): int {} * @removed 8.0 */ #[Deprecated(reason: "Use see gmp_random_bits() or see gmp_random_range() instead", since: "7.2")] -#[Pure] +#[Pure(true)] function gmp_random($limiter = 20) {} /** diff --git a/intl/intl.php b/intl/intl.php index 953b346e..d7eed4e0 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -3558,7 +3558,7 @@ function collator_get_locale(Collator $object, int $type = null): string|false { * @param Collator $object * @return int|false Error code returned by the last Collator API function call. */ -#[Pure] +#[Pure(true)] function collator_get_error_code(Collator $object): int|false {} /** @@ -3821,7 +3821,7 @@ function numfmt_get_locale(NumberFormatter $formatter, int $type = null): string * @param NumberFormatter $formatter * @return int error code from last formatter call. */ -#[Pure] +#[Pure(true)] function numfmt_get_error_code(NumberFormatter $formatter): int {} /** @@ -3831,7 +3831,7 @@ function numfmt_get_error_code(NumberFormatter $formatter): int {} * @param NumberFormatter $formatter * @return string error message from last formatter call. */ -#[Pure] +#[Pure(true)] function numfmt_get_error_message(NumberFormatter $formatter): string {} /** @@ -4242,7 +4242,7 @@ function msgfmt_get_locale(MessageFormatter $formatter): string {} * @param MessageFormatter $formatter * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR. */ -#[Pure] +#[Pure(true)] function msgfmt_get_error_code(MessageFormatter $formatter): int {} /** @@ -4252,7 +4252,7 @@ function msgfmt_get_error_code(MessageFormatter $formatter): int {} * @param MessageFormatter $formatter * @return string Description of the last error. */ -#[Pure] +#[Pure(true)] function msgfmt_get_error_message(MessageFormatter $formatter): string {} /** @@ -4568,7 +4568,7 @@ function datefmt_localtime(IntlDateFormatter $formatter, string $string, &$offse * @param IntlDateFormatter $formatter * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR. */ -#[Pure] +#[Pure(true)] function datefmt_get_error_code(IntlDateFormatter $formatter): int {} /** @@ -4578,7 +4578,7 @@ function datefmt_get_error_code(IntlDateFormatter $formatter): int {} * @param IntlDateFormatter $formatter * @return string Description of the last error. */ -#[Pure] +#[Pure(true)] function datefmt_get_error_message(IntlDateFormatter $formatter): string {} /** @@ -4913,7 +4913,7 @@ function intlcal_get_keyword_values_for_locale(string $keyword, string $locale, * @return float A float representing a number of milliseconds since the epoch, not counting leap seconds. * @since 5.5 */ -#[Pure] +#[Pure(true)] function intlcal_get_now(): float {} /** @@ -5729,7 +5729,7 @@ function intlcal_to_date_time(IntlCalendar $calendar): DateTime|false {} * @return int|false An ICU error code indicating either success, failure or a warning. * @since 5.5 */ -#[Pure] +#[Pure(true)] function intlcal_get_error_code(IntlCalendar $calendar): int|false {} /** @@ -5742,7 +5742,7 @@ function intlcal_get_error_code(IntlCalendar $calendar): int|false {} * @return string|false The error message associated with last error that occurred in a function call on this object, or a string indicating the non-existance of an error. * @since 5.5 */ -#[Pure] +#[Pure(true)] function intlcal_get_error_message(IntlCalendar $calendar): string|false {} /** @@ -5858,7 +5858,7 @@ function intltz_get_equivalent_id(string $timezoneId, int $offset): string|false * @return int|false * @since 5.5 */ -#[Pure] +#[Pure(true)] function intltz_get_error_code(IntlTimeZone $timezone): int|false {} /** @@ -5871,7 +5871,7 @@ function intltz_get_error_code(IntlTimeZone $timezone): int|false {} * @return string|false * @since 5.5 */ -#[Pure] +#[Pure(true)] function intltz_get_error_message(IntlTimeZone $timezone): string|false {} /** @@ -6063,7 +6063,7 @@ function resourcebundle_locales(string $bundle): array|false {} * @param $bundle * @return int error code from last bundle object call. */ -#[Pure] +#[Pure(true)] function resourcebundle_get_error_code(ResourceBundle $bundle): int {} /** @@ -6073,7 +6073,7 @@ function resourcebundle_get_error_code(ResourceBundle $bundle): int {} * @param $bundle * @return string error message from last bundle object's call. */ -#[Pure] +#[Pure(true)] function resourcebundle_get_error_message(ResourceBundle $bundle): string {} /** @@ -6172,7 +6172,7 @@ function transliterator_transliterate(Transliterator|string $transliterator, str * or FALSE if none exists, or on failure. * @since 5.4 */ -#[Pure] +#[Pure(true)] function transliterator_get_error_code(Transliterator $transliterator): int|false {} /** @@ -6184,7 +6184,7 @@ function transliterator_get_error_code(Transliterator $transliterator): int|fals * or FALSE if none exists, or on failure. * @since 5.4 */ -#[Pure] +#[Pure(true)] function transliterator_get_error_message(Transliterator $transliterator): string|false {} /** @@ -6193,7 +6193,7 @@ function transliterator_get_error_message(Transliterator $transliterator): strin * @link https://php.net/manual/en/function.intl-get-error-code.php * @return int Error code returned by the last API function call. */ -#[Pure] +#[Pure(true)] function intl_get_error_code(): int {} /** @@ -6202,7 +6202,7 @@ function intl_get_error_code(): int {} * @link https://php.net/manual/en/function.intl-get-error-message.php * @return string Description of an error occurred in the last API function call. */ -#[Pure] +#[Pure(true)] function intl_get_error_message(): string {} /** diff --git a/libxml/libxml.php b/libxml/libxml.php index b1bb0c41..6a10a82f 100644 --- a/libxml/libxml.php +++ b/libxml/libxml.php @@ -90,7 +90,7 @@ function libxml_use_internal_errors(?bool $use_errors = false): bool {} * @return LibXMLError|false a LibXMLError object if there is any error in the * buffer, FALSE otherwise. */ -#[Pure] +#[Pure(true)] function libxml_get_last_error(): LibXMLError|false {} /** @@ -106,7 +106,7 @@ function libxml_clear_errors(): void {} * @return LibXMLError[] an array with LibXMLError objects if there are any * errors in the buffer, or an empty array otherwise. */ -#[Pure] +#[Pure(true)] function libxml_get_errors(): array {} /** diff --git a/pcntl/pcntl.php b/pcntl/pcntl.php index 9b38a205..5af81462 100644 --- a/pcntl/pcntl.php +++ b/pcntl/pcntl.php @@ -297,7 +297,7 @@ function pcntl_alarm(int $seconds): int {} * @return int error code. * @since 5.3.4 */ -#[Pure] +#[Pure(true)] function pcntl_get_last_error(): int {} /** @@ -306,7 +306,7 @@ function pcntl_get_last_error(): int {} * @return int error code. * @since 5.3.4 */ -#[Pure] +#[Pure(true)] function pcntl_errno(): int {} /** diff --git a/pcre/pcre.php b/pcre/pcre.php index ff557aed..26a7d57a 100644 --- a/pcre/pcre.php +++ b/pcre/pcre.php @@ -483,7 +483,7 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array|false { * PREG_BAD_UTF8_ERROR * PREG_BAD_UTF8_OFFSET_ERROR (since PHP 5.3.0) */ -#[Pure] +#[Pure(true)] function preg_last_error(): int {} /** @@ -492,7 +492,7 @@ function preg_last_error(): int {} * @return string one of the error messages or "No error" if there is no error. * @since 8.0 */ -#[Pure] +#[Pure(true)] function preg_last_error_msg(): string {} /** diff --git a/posix/posix.php b/posix/posix.php index 3b14217f..93733247 100644 --- a/posix/posix.php +++ b/posix/posix.php @@ -268,7 +268,7 @@ function posix_isatty($file_descriptor): bool {} * On error, returns FALSE and sets errno which can be checked with * posix_get_last_error. */ -#[Pure] +#[Pure(true)] function posix_getcwd(): string|false {} /** @@ -674,14 +674,14 @@ function posix_getrlimit(): array|false {} * @return int the errno (error number) set by the last posix function that * failed. If no errors exist, 0 is returned. */ -#[Pure] +#[Pure(true)] function posix_get_last_error(): int {} /** * Alias of posix_get_last_error * @link https://php.net/manual/en/function.posix-errno.php */ -#[Pure] +#[Pure(true)] function posix_errno(): int {} /**