@@ -2253,6 +2260,7 @@ function curl_strerror(int $error_code): ?string {}
*/
#[Pure]
function curl_unescape(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, string $string): string|false {}
+
/**
* Perform a cURL session
* @link https://php.net/manual/en/function.curl-exec.php
@@ -2400,7 +2408,7 @@ function curl_multi_select(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle']
* @param int $option
* One of the CURLMOPT_* constants.
*
- * @param mixed $value
+ * @param mixed $value
* The value to be set on option.
*
*
diff --git a/date/date_c.php b/date/date_c.php
index 6ab0b4d7e..e70df0682 100644
--- a/date/date_c.php
+++ b/date/date_c.php
@@ -3,6 +3,7 @@
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
+use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;
/**
@@ -86,10 +87,11 @@ interface DateTimeInterface
* The https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
* difference between the two dates.
*/
+ #[TentativeType]
public function diff(
DateTimeInterface $targetObject,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
- );
+ ): DateInterval;
/**
* (PHP 5 >=5.5.0)
@@ -102,8 +104,8 @@ public function diff(
* Returns the formatted date string on success or FALSE on failure.
* Since PHP8, it always returns STRING.
*/
- #[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")]
- public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format);
+ #[TentativeType]
+ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string;
/**
* (PHP 5 >=5.5.0)
@@ -113,7 +115,8 @@ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
* or FALSE on failure. Since PHP8, it always returns INT.
*/
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
- public function getOffset();
+ #[TentativeType]
+ public function getOffset(): int;
/**
* (PHP 5 >=5.5.0)
@@ -121,7 +124,8 @@ public function getOffset();
* @return int
* Returns the Unix timestamp representing the date.
*/
- public function getTimestamp();
+ #[TentativeType]
+ public function getTimestamp(): int|false;
/**
* (PHP 5 >=5.5.0)
@@ -131,7 +135,8 @@ public function getTimestamp();
* Returns a {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
* or FALSE on failure.
*/
- public function getTimezone();
+ #[TentativeType]
+ public function getTimezone(): DateTimeZone|false;
/**
* (PHP 5 >=5.5.0)
@@ -139,7 +144,8 @@ public function getTimezone();
* @link https://secure.php.net/manual/en/datetime.wakeup.php
* @return void Initializes a DateTime object.
*/
- public function __wakeup();
+ #[TentativeType]
+ public function __wakeup(): void;
}
/**
@@ -187,7 +193,8 @@ public function __construct(
* @param DateInterval $interval
* @return static
*/
- public function add(DateInterval $interval) {}
+ #[TentativeType]
+ public function add(DateInterval $interval): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
@@ -198,11 +205,12 @@ public function add(DateInterval $interval) {}
* @param null|DateTimeZone $timezone [optional]
* @return DateTimeImmutable|false
*/
+ #[TentativeType]
public static function createFromFormat(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime,
#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null
- ) {}
+ ): DateTimeImmutable|false {}
/**
* (PHP 5 >=5.6.0)
@@ -211,7 +219,8 @@ public static function createFromFormat(
* @param DateTime $object The mutable DateTime object that you want to convert to an immutable version. This object is not modified, but instead a new DateTimeImmutable object is created containing the same date time and timezone information.
* @return DateTimeImmutable returns a new DateTimeImmutable instance.
*/
- public static function createFromMutable(DateTime $object) {}
+ #[TentativeType]
+ public static function createFromMutable(DateTime $object): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
@@ -220,19 +229,21 @@ public static function createFromMutable(DateTime $object) {}
* @return array|false Returns array containing info about warnings and errors.
*/
#[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])]
- public static function getLastErrors() {}
+ #[TentativeType]
+ public static function getLastErrors(): array|false {}
/**
* (PHP 5 >=5.5.0)
* Alters the timestamp
* @link https://secure.php.net/manual/en/datetimeimmutable.modify.php
- * @param string $modifier
A date/time string. Valid formats are explained in
+ * @param string $modifier
A date/time string. Valid formats are explained in
* {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}.
* @return static|false Returns the newly created object or false on failure.
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure.
*/
#[Pure]
- public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}
+ #[TentativeType]
+ public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTimeImmutable|false {}
/**
* (PHP 5 >=5.5.0)
@@ -254,27 +265,29 @@ public static function __set_state(array $array) {}
* @return static|false
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure.
*/
+ #[TentativeType]
public function setDate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day
- ) {}
+ ): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
* Sets the ISO date
* @link https://php.net/manual/en/class.datetimeimmutable.php
* @param int $year Year of the date.
- * @param int $week Week of the date.
+ * @param int $week Week of the date.
* @param int $dayOfWeek [optional] Offset from the first day of the week.
* @return static|false
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure.
*/
+ #[TentativeType]
public function setISODate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1
- ) {}
+ ): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
@@ -287,22 +300,24 @@ public function setISODate(
* @return static|false
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure.
*/
+ #[TentativeType]
public function setTime(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0
- ) {}
+ ): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
* Sets the date and time based on an Unix timestamp
* @link https://secure.php.net/manual/en/datetimeimmutable.settimestamp.php
* @param int $timestamp Unix timestamp representing the date.
- * @return static|false
+ * @return static
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure.
*/
- public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp) {}
+ #[TentativeType]
+ public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
@@ -312,10 +327,11 @@ public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default:
* A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the
* desired time zone.
*
- * @return static|false
+ * @return static
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure.
*/
- public function setTimezone(DateTimeZone $timezone) {}
+ #[TentativeType]
+ public function setTimezone(DateTimeZone $timezone): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
@@ -324,10 +340,11 @@ public function setTimezone(DateTimeZone $timezone) {}
* @param DateInterval $interval
* A {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object
*
- * @return static|false
+ * @return static
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure.
*/
- public function sub(DateInterval $interval) {}
+ #[TentativeType]
+ public function sub(DateInterval $interval): DateTimeImmutable {}
/**
* (PHP 5 >=5.5.0)
@@ -339,10 +356,11 @@ public function sub(DateInterval $interval) {}
* The {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
* difference between the two dates or FALSE on failure.
*/
+ #[TentativeType]
public function diff(
#[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
- ) {}
+ ): DateInterval {}
/**
* (PHP 5 >=5.5.0)
@@ -354,7 +372,8 @@ public function diff(
* @return string
* Returns the formatted date string on success or FALSE on failure.
*/
- public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format) {}
+ #[TentativeType]
+ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}
/**
* (PHP 5 >=5.5.0)
@@ -363,7 +382,8 @@ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
* Returns the timezone offset in seconds from UTC on success
* or FALSE on failure.
*/
- public function getOffset() {}
+ #[TentativeType]
+ public function getOffset(): int {}
/**
* (PHP 5 >=5.5.0)
@@ -371,7 +391,8 @@ public function getOffset() {}
* @return int
* Returns the Unix timestamp representing the date.
*/
- public function getTimestamp() {}
+ #[TentativeType]
+ public function getTimestamp(): int {}
/**
* (PHP 5 >=5.5.0)
@@ -381,7 +402,8 @@ public function getTimestamp() {}
* Returns a {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
* or FALSE on failure.
*/
- public function getTimezone() {}
+ #[TentativeType]
+ public function getTimezone(): DateTimeZone|false {}
/**
* (PHP 5 >=5.5.0)
@@ -389,14 +411,15 @@ public function getTimezone() {}
* @link https://secure.php.net/manual/en/datetime.wakeup.php
* @return void Initializes a DateTime object.
*/
- public function __wakeup() {}
+ #[TentativeType]
+ public function __wakeup(): void {}
/**
* @param DateTimeInterface $object
* @return DateTimeImmutable
* @since 8.0
*/
- public static function createFromInterface(DateTimeInterface $object) {}
+ public static function createFromInterface(DateTimeInterface $object): DateTimeImmutable {}
}
/**
@@ -507,7 +530,8 @@ public function __construct(
* @return void
* @link https://php.net/manual/en/datetime.wakeup.php
*/
- public function __wakeup() {}
+ #[TentativeType]
+ public function __wakeup(): void {}
/**
* Returns date formatted according to given format.
@@ -515,7 +539,8 @@ public function __wakeup() {}
* @return string
* @link https://php.net/manual/en/datetime.format.php
*/
- public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format) {}
+ #[TentativeType]
+ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}
/**
* Alter the timestamp of a DateTime object by incrementing or decrementing
@@ -524,7 +549,8 @@ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
* @return static|false Returns the DateTime object for method chaining or FALSE on failure.
* @link https://php.net/manual/en/datetime.modify.php
*/
- public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}
+ #[TentativeType]
+ public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTime|false {}
/**
* Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object
@@ -532,14 +558,16 @@ public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
* @return static
* @link https://php.net/manual/en/datetime.add.php
*/
- public function add(DateInterval $interval) {}
+ #[TentativeType]
+ public function add(DateInterval $interval): DateTime {}
/**
* @param DateTimeImmutable $object
- * @since 7.3
* @return DateTime
+ * @since 7.3
*/
- public static function createFromImmutable(DateTimeImmutable $object) {}
+ #[TentativeType]
+ public static function createFromImmutable(DateTimeImmutable $object): DateTime {}
/**
* Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
@@ -547,14 +575,16 @@ public static function createFromImmutable(DateTimeImmutable $object) {}
* @return static
* @link https://php.net/manual/en/datetime.sub.php
*/
- public function sub(DateInterval $interval) {}
+ #[TentativeType]
+ public function sub(DateInterval $interval): DateTime {}
/**
* Get the TimeZone associated with the DateTime
* @return DateTimeZone|false
* @link https://php.net/manual/en/datetime.gettimezone.php
*/
- public function getTimezone() {}
+ #[TentativeType]
+ public function getTimezone(): DateTimeZone|false {}
/**
* Set the TimeZone associated with the DateTime
@@ -562,14 +592,16 @@ public function getTimezone() {}
* @return static
* @link https://php.net/manual/en/datetime.settimezone.php
*/
- public function setTimezone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone) {}
+ #[TentativeType]
+ public function setTimezone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): DateTime {}
/**
* Returns the timezone offset
* @return int
* @link https://php.net/manual/en/datetime.getoffset.php
*/
- public function getOffset() {}
+ #[TentativeType]
+ public function getOffset(): int {}
/**
* Sets the current time of the DateTime object to a different time.
@@ -580,12 +612,13 @@ public function getOffset() {}
* @return static
* @link https://php.net/manual/en/datetime.settime.php
*/
+ #[TentativeType]
public function setTime(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0
- ) {}
+ ): DateTime {}
/**
* Sets the current date of the DateTime object to a different date.
@@ -595,11 +628,12 @@ public function setTime(
* @return static
* @link https://php.net/manual/en/datetime.setdate.php
*/
+ #[TentativeType]
public function setDate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day
- ) {}
+ ): DateTime {}
/**
* Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
@@ -609,11 +643,12 @@ public function setDate(
* @return static
* @link https://php.net/manual/en/datetime.setisodate.php
*/
+ #[TentativeType]
public function setISODate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1
- ) {}
+ ): DateTime {}
/**
* Sets the date and time based on a Unix timestamp.
@@ -621,14 +656,16 @@ public function setISODate(
* @return static
* @link https://php.net/manual/en/datetime.settimestamp.php
*/
- public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp) {}
+ #[TentativeType]
+ public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTime {}
/**
* Gets the Unix timestamp.
* @return int
* @link https://php.net/manual/en/datetime.gettimestamp.php
*/
- public function getTimestamp() {}
+ #[TentativeType]
+ public function getTimestamp(): int {}
/**
* Returns the difference between two DateTime objects represented as a DateInterval.
@@ -637,10 +674,11 @@ public function getTimestamp() {}
* @return DateInterval The DateInterval object representing the difference between the two dates.
* @link https://php.net/manual/en/datetime.diff.php
*/
+ #[TentativeType]
public function diff(
#[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false
- ) {}
+ ): DateInterval {}
/**
* Parse a string into a new DateTime object according to the specified format
@@ -650,11 +688,12 @@ public function diff(
* @return DateTime|false
* @link https://php.net/manual/en/datetime.createfromformat.php
*/
+ #[TentativeType]
public static function createFromFormat(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime,
#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null
- ) {}
+ ): DateTime|false {}
/**
* Returns an array of warnings and errors found while parsing a date/time string
@@ -662,7 +701,8 @@ public static function createFromFormat(
* @link https://php.net/manual/en/datetime.getlasterrors.php
*/
#[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])]
- public static function getLastErrors() {}
+ #[TentativeType]
+ public static function getLastErrors(): array|false {}
/**
* The __set_state handler
@@ -677,7 +717,7 @@ public static function __set_state($array) {}
* @return DateTime
* @since 8.0
*/
- public static function createFromInterface(DateTimeInterface $object) {}
+ public static function createFromInterface(DateTimeInterface $object): DateTime {}
}
/**
@@ -712,14 +752,16 @@ public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], defaul
* @return string
* @link https://php.net/manual/en/datetimezone.getname.php
*/
- public function getName() {}
+ #[TentativeType]
+ public function getName(): string {}
/**
* Returns location information for a timezone
* @return array|false
* @link https://php.net/manual/en/datetimezone.getlocation.php
*/
- public function getLocation() {}
+ #[TentativeType]
+ public function getLocation(): array|false {}
/**
* Returns the timezone offset from GMT
@@ -727,7 +769,8 @@ public function getLocation() {}
* @return int
* @link https://php.net/manual/en/datetimezone.getoffset.php
*/
- public function getOffset(DateTimeInterface $datetime) {}
+ #[TentativeType]
+ public function getOffset(DateTimeInterface $datetime): int {}
/**
* Returns all transitions for the timezone
@@ -736,17 +779,19 @@ public function getOffset(DateTimeInterface $datetime) {}
* @return array|false
* @link https://php.net/manual/en/datetimezone.gettransitions.php
*/
+ #[TentativeType]
public function getTransitions(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampBegin = null,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampEnd = null
- ) {}
+ ): array|false {}
/**
* Returns associative array containing dst, offset and the timezone name
* @return array
* @link https://php.net/manual/en/datetimezone.listabbreviations.php
*/
- public static function listAbbreviations() {}
+ #[TentativeType]
+ public static function listAbbreviations(): array {}
/**
* Returns a numerically indexed array with all timezone identifiers
@@ -756,15 +801,17 @@ public static function listAbbreviations() {}
* @link https://php.net/manual/en/datetimezone.listidentifiers.php
*/
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
+ #[TentativeType]
public static function listIdentifiers(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timezoneGroup = DateTimeZone::ALL,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $countryCode = null
- ) {}
+ ): array {}
/**
* @link https://php.net/manual/en/datetime.wakeup.php
*/
- public function __wakeup() {}
+ #[TentativeType]
+ public function __wakeup(): void {}
public static function __set_state($an_array) {}
}
@@ -834,8 +881,8 @@ class DateInterval
/**
* @param string $duration
+ * @throws Exception when the $duration cannot be parsed as an interval.
* @link https://php.net/manual/en/dateinterval.construct.php
- * @throws \Exception when the $duration cannot be parsed as an interval.
*/
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $duration) {}
@@ -845,7 +892,8 @@ public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], defaul
* @return string
* @link https://php.net/manual/en/dateinterval.format.php
*/
- public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format) {}
+ #[TentativeType]
+ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {}
/**
* Sets up a DateInterval from the relative parts of the string
@@ -854,9 +902,11 @@ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
* instance on success, or FALSE on failure.
* @link https://php.net/manual/en/dateinterval.createfromdatestring.php
*/
- public static function createFromDateString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime) {}
+ #[TentativeType]
+ public static function createFromDateString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime): DateInterval|false {}
- public function __wakeup() {}
+ #[TentativeType]
+ public function __wakeup(): void {}
public static function __set_state($an_array) {}
}
@@ -936,7 +986,8 @@ public function __construct($isostr, $options = 0) {}
* @link https://php.net/manual/en/dateperiod.getdateinterval.php
* @since 5.6.5
*/
- public function getDateInterval() {}
+ #[TentativeType]
+ public function getDateInterval(): DateInterval {}
/**
* Gets the end date
@@ -944,7 +995,8 @@ public function getDateInterval() {}
* @link https://php.net/manual/en/dateperiod.getenddate.php
* @since 5.6.5
*/
- public function getEndDate() {}
+ #[TentativeType]
+ public function getEndDate(): ?DateTimeInterface {}
/**
* Gets the start date
@@ -952,11 +1004,14 @@ public function getEndDate() {}
* @link https://php.net/manual/en/dateperiod.getstartdate.php
* @since 5.6.5
*/
- public function getStartDate() {}
+ #[TentativeType]
+ public function getStartDate(): DateTimeInterface {}
- public static function __set_state(#[PhpStormStubsElementAvailable(from: '7.3')] array $array) {}
+ #[TentativeType]
+ public static function __set_state(#[PhpStormStubsElementAvailable(from: '7.3')] array $array): DatePeriod {}
- public function __wakeup() {}
+ #[TentativeType]
+ public function __wakeup(): void {}
/**
* Get the number of recurrences
@@ -964,11 +1019,12 @@ public function __wakeup() {}
* @link https://php.net/manual/en/dateperiod.getrecurrences.php
* @since 7.2.17
*/
- public function getRecurrences() {}
+ #[TentativeType]
+ public function getRecurrences(): ?int {}
/**
- * @return DateTimeInterface[]
+ * @return Iterator
* @since 8.0
*/
- public function getIterator() {}
+ public function getIterator(): Iterator {}
}
diff --git a/dom/dom_c.php b/dom/dom_c.php
index a800b5b4f..31afdc66d 100644
--- a/dom/dom_c.php
+++ b/dom/dom_c.php
@@ -4,6 +4,7 @@
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
+use JetBrains\PhpStorm\Internal\TentativeType;
/**
* The DOMNode class
@@ -197,7 +198,8 @@ public function appendChild(DOMNode $node) {}
* @link https://php.net/manual/en/domnode.haschildnodes.php
* @return bool true on success or false on failure.
*/
- public function hasChildNodes() {}
+ #[TentativeType]
+ public function hasChildNodes(): bool {}
/**
* Clones a node
@@ -215,7 +217,8 @@ public function cloneNode(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '
* @link https://php.net/manual/en/domnode.normalize.php
* @return void
*/
- public function normalize() {}
+ #[TentativeType]
+ public function normalize(): void {}
/**
* Checks if feature is supported for specified version
@@ -230,17 +233,19 @@ public function normalize() {}
*
* @return bool true on success or false on failure.
*/
+ #[TentativeType]
public function isSupported(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version
- ) {}
+ ): bool {}
/**
* Checks if node has attributes
* @link https://php.net/manual/en/domnode.hasattributes.php
* @return bool true on success or false on failure.
*/
- public function hasAttributes() {}
+ #[TentativeType]
+ public function hasAttributes(): bool {}
/**
* @param DOMNode $other
@@ -255,7 +260,8 @@ public function compareDocumentPosition(DOMNode $other) {}
*
* @return bool true on success or false on failure.
*/
- public function isSameNode(DOMNode $otherNode) {}
+ #[TentativeType]
+ public function isSameNode(DOMNode $otherNode): bool {}
/**
* Gets the namespace prefix of the node based on the namespace URI
@@ -265,7 +271,8 @@ public function isSameNode(DOMNode $otherNode) {}
*
* @return string The prefix of the namespace.
*/
- public function lookupPrefix(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace) {}
+ #[TentativeType]
+ public function lookupPrefix(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): ?string {}
/**
* Checks if the specified namespaceURI is the default namespace or not
@@ -276,7 +283,8 @@ public function lookupPrefix(#[LanguageLevelTypeAware(['8.0' => 'string'], defau
* @return bool Return true if namespaceURI is the default
* namespace, false otherwise.
*/
- public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace) {}
+ #[TentativeType]
+ public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): bool {}
/**
* Gets the namespace URI of the node based on the prefix
@@ -287,7 +295,8 @@ public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'],
* @return string The namespace URI of the node.
*/
#[PhpStormStubsElementAvailable(from: '8.0')]
- public function lookupNamespaceURI(?string $prefix) {}
+ #[TentativeType]
+ public function lookupNamespaceURI(?string $prefix): ?string {}
/**
* Gets the namespace URI of the node based on the prefix
@@ -299,6 +308,7 @@ public function lookupNamespaceURI(?string $prefix) {}
*/
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
public function lookupNamespaceUri($prefix) {}
+
/**
* @param DOMNode $arg
* @return bool
@@ -330,14 +340,16 @@ public function getUserData($key) {}
* @return string|null the XPath, or NULL in case of an error.
* @link https://secure.php.net/manual/en/domnode.getnodepath.php
*/
- public function getNodePath() {}
+ #[TentativeType]
+ public function getNodePath(): ?string {}
- /**
- * Get line number for a node
- * @link https://php.net/manual/en/domnode.getlineno.php
- * @return int Always returns the line number where the node was defined in.
- */
- public function getLineNo() {}
+ /**
+ * Get line number for a node
+ * @link https://php.net/manual/en/domnode.getlineno.php
+ * @return int Always returns the line number where the node was defined in.
+ */
+ #[TentativeType]
+ public function getLineNo(): int {}
/**
* Canonicalize nodes to a string
@@ -347,12 +359,13 @@ public function getLineNo() {}
* @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by.
* @return string|false Canonicalized nodes as a string or FALSE on failure
*/
+ #[TentativeType]
public function C14N(
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false,
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null,
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null
- ) {}
+ ): string|false {}
/**
* Canonicalize nodes to a file.
@@ -364,13 +377,14 @@ public function C14N(
* @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by.
* @return int|false Number of bytes written or FALSE on failure
*/
+ #[TentativeType]
public function C14NFile(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false,
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null,
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null
- ) {}
+ ): int|false {}
}
/**
@@ -389,11 +403,11 @@ class DOMException extends Exception
class DOMStringList
{
- /**
- * @param $index
- * @return mixed
- */
- public function item($index) {}
+ /**
+ * @param $index
+ * @return mixed
+ */
+ public function item($index) {}
}
/**
@@ -402,17 +416,17 @@ public function item($index) {}
*/
class DOMNameList
{
- /**
- * @param $index
- * @return mixed
- */
- public function getName($index) {}
-
- /**
- * @param $index
- * @return mixed
- */
- public function getNamespaceURI($index) {}
+ /**
+ * @param $index
+ * @return mixed
+ */
+ public function getName($index) {}
+
+ /**
+ * @param $index
+ * @return mixed
+ */
+ public function getNamespaceURI($index) {}
}
/**
@@ -420,11 +434,11 @@ public function getNamespaceURI($index) {}
*/
class DOMImplementationList
{
- /**
- * @param $index
- * @return mixed
- */
- public function item($index) {}
+ /**
+ * @param $index
+ * @return mixed
+ */
+ public function item($index) {}
}
/**
@@ -432,17 +446,17 @@ public function item($index) {}
*/
class DOMImplementationSource
{
- /**
- * @param $features
- * @return mixed
- */
- public function getDomimplementation($features) {}
-
- /**
- * @param $features
- * @return mixed
- */
- public function getDomimplementations($features) {}
+ /**
+ * @param $features
+ * @return mixed
+ */
+ public function getDomimplementation($features) {}
+
+ /**
+ * @param $features
+ * @return mixed
+ */
+ public function getDomimplementations($features) {}
}
/**
@@ -458,10 +472,11 @@ class DOMImplementation
* @param string $version
* @return mixed
*/
+ #[TentativeType]
public function getFeature(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version
- ) {}
+ ): never {}
/**
* Test if the DOM implementation implements a specific feature
@@ -571,17 +586,18 @@ public function __construct() {}
*
* @return bool true on success or false on failure.
*/
- public function appendXML(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
+ #[TentativeType]
+ public function appendXML(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {}
/**
* {@inheritDoc}
*/
- public function append(...$nodes) {}
+ public function append(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function prepend(...$nodes) {}
+ public function prepend(...$nodes): void {}
}
/**
@@ -786,7 +802,8 @@ public function createElement(
* @link https://php.net/manual/en/domdocument.createdocumentfragment.php
* @return DOMDocumentFragment|false The new DOMDocumentFragment or false if an error occurred.
*/
- public function createDocumentFragment() {}
+ #[TentativeType]
+ public function createDocumentFragment(): DOMDocumentFragment {}
/**
* Create new text node
@@ -796,7 +813,8 @@ public function createDocumentFragment() {}
*
* @return DOMText|false The new DOMText or false if an error occurred.
*/
- public function createTextNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
+ #[TentativeType]
+ public function createTextNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMText {}
/**
* Create new comment node
@@ -806,7 +824,8 @@ public function createTextNode(#[LanguageLevelTypeAware(['8.0' => 'string'], def
*
* @return DOMComment|false The new DOMComment or false if an error occurred.
*/
- public function createComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
+ #[TentativeType]
+ public function createComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMComment {}
/**
* Create new cdata node
@@ -868,7 +887,8 @@ public function createEntityReference(#[LanguageLevelTypeAware(['8.0' => 'string
* @return DOMNodeList A new DOMNodeList object containing all the matched
* elements.
*/
- public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
+ #[TentativeType]
+ public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {}
/**
* Import node into current document
@@ -940,10 +960,11 @@ public function createAttributeNS(
* @return DOMNodeList A new DOMNodeList object containing all the matched
* elements.
*/
+ #[TentativeType]
public function getElementsByTagNameNS(
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
- ) {}
+ ): DOMNodeList {}
/**
* Searches for an element with a certain id
@@ -954,7 +975,8 @@ public function getElementsByTagNameNS(
* @return DOMElement|null The DOMElement or null if the element is
* not found.
*/
- public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId) {}
+ #[TentativeType]
+ public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId): ?DOMElement {}
/**
* @param DOMNode $node
@@ -964,19 +986,20 @@ public function adoptNode(DOMNode $node) {}
/**
* {@inheritDoc}
*/
- public function append(...$nodes) {}
+ public function append(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function prepend(...$nodes) {}
+ public function prepend(...$nodes): void {}
/**
* Normalizes the document
* @link https://php.net/manual/en/domdocument.normalizedocument.php
* @return void
*/
- public function normalizeDocument() {}
+ #[TentativeType]
+ public function normalizeDocument(): void {}
/**
* @param DOMNode $node
@@ -1048,7 +1071,8 @@ public function loadXML(
*
* @return string|false the XML, or false if an error occurred.
*/
- public function saveXML(?DOMNode $node = null, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null) {}
+ #[TentativeType]
+ public function saveXML(?DOMNode $node = null, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): string|false {}
/**
* Creates a new DOMDocument object
@@ -1067,7 +1091,8 @@ public function __construct(
* @return bool true on success or false on failure.
* If the document have no DTD attached, this method will return false.
*/
- public function validate() {}
+ #[TentativeType]
+ public function validate(): bool {}
/**
* Substitutes XIncludes in a DOMDocument Object
@@ -1076,9 +1101,10 @@ public function validate() {}
* libxml parameters. Available
* since PHP 5.1.0 and Libxml 2.6.7.
*
- * @return int the number of XIncludes in the document.
+ * @return int|false the number of XIncludes in the document.
*/
- public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null) {}
+ #[TentativeType]
+ public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): int|false {}
/**
* Load HTML from a string
@@ -1134,7 +1160,8 @@ public function saveHTML(DOMNode $node = null) {}
*
* @return int|false the number of bytes written or false if an error occurred.
*/
- public function saveHTMLFile(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {}
+ #[TentativeType]
+ public function saveHTMLFile(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): int|false {}
/**
* Validates a document based on a schema
@@ -1170,7 +1197,8 @@ public function schemaValidateSource($source, $flags) {}
*
* @return bool true on success or false on failure.
*/
- public function relaxNGValidate(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {}
+ #[TentativeType]
+ public function relaxNGValidate(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): bool {}
/**
* Performs relaxNG validation on the document
@@ -1180,7 +1208,8 @@ public function relaxNGValidate(#[LanguageLevelTypeAware(['8.0' => 'string'], de
*
* @return bool true on success or false on failure.
*/
- public function relaxNGValidateSource(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source) {}
+ #[TentativeType]
+ public function relaxNGValidateSource(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source): bool {}
/**
* Register extended class used to create base node type
@@ -1196,10 +1225,11 @@ public function relaxNGValidateSource(#[LanguageLevelTypeAware(['8.0' => 'string
*
* @return bool true on success or false on failure.
*/
+ #[TentativeType]
public function registerNodeClass(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $baseClass,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extendedClass
- ) {}
+ ): bool {}
}
/**
@@ -1232,13 +1262,14 @@ public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $i
/**
* @since 7.2
*/
- public function count() {}
+ #[TentativeType]
+ public function count(): int {}
/**
+ * @return Iterator
* @since 8.0
- * @return Traversable
*/
- public function getIterator() {}
+ public function getIterator(): Iterator {}
}
/**
@@ -1257,7 +1288,8 @@ class DOMNamedNodeMap implements IteratorAggregate, Countable
* @return DOMNode|null A node (of any type) with the specified nodeName, or
* null if no node is found.
*/
- public function getNamedItem(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
+ #[TentativeType]
+ public function getNamedItem(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): ?DOMNode {}
/**
* @param DOMNode $arg
@@ -1279,7 +1311,8 @@ public function removeNamedItem($name) {}
* if that is not a valid index (greater than or equal to the number of nodes
* in this map).
*/
- public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {}
+ #[TentativeType]
+ public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index): ?DOMNode {}
/**
* Retrieves a node specified by local name and namespace URI
@@ -1293,10 +1326,11 @@ public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $i
* @return DOMNode|null A node (of any type) with the specified local name and namespace URI, or
* null if no node is found.
*/
+ #[TentativeType]
public function getNamedItemNS(
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
- ) {}
+ ): ?DOMNode {}
/**
* @param DOMNode $arg [optional]
@@ -1310,16 +1344,17 @@ public function setNamedItemNS(DOMNode $arg) {}
public function removeNamedItemNS($namespace, $localName) {}
/**
- * @since 7.2
* @return int
+ * @since 7.2
*/
- public function count() {}
+ #[TentativeType]
+ public function count(): int {}
/**
- * @since 8.0
* @return Traversable
+ * @since 8.0
*/
- public function getIterator() {}
+ public function getIterator(): Iterator {}
}
/**
@@ -1377,7 +1412,8 @@ public function substringData(
*
* @return void
*/
- public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {}
+ #[TentativeType]
+ public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {}
/**
* Insert a string at the specified 16-bit unit offset
@@ -1388,12 +1424,13 @@ public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default
* @param string $data
* The string to insert.
*
- * @return void
+ * @return bool
*/
+ #[TentativeType]
public function insertData(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
- ) {}
+ ): bool {}
/**
* Remove a range of characters from the node
@@ -1408,10 +1445,11 @@ public function insertData(
*
* @return void
*/
+ #[TentativeType]
public function deleteData(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count
- ) {}
+ ): bool {}
/**
* Replace a substring within the DOMCharacterData node
@@ -1427,33 +1465,34 @@ public function deleteData(
* @param string $data
* The string with which the range must be replaced.
*
- * @return void
+ * @return bool
*/
+ #[TentativeType]
public function replaceData(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data
- ) {}
+ ): bool {}
/**
* {@inheritDoc}
*/
- public function remove() {}
+ public function remove(): void {}
/**
* {@inheritDoc}
*/
- public function before(...$nodes) {}
+ public function before(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function after(...$nodes) {}
+ public function after(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function replaceWith(...$nodes) {}
+ public function replaceWith(...$nodes): void {}
}
/**
@@ -1512,7 +1551,8 @@ class DOMAttr extends DOMNode
* @link https://php.net/manual/en/domattr.isid.php
* @return bool true on success or false on failure.
*/
- public function isId() {}
+ #[TentativeType]
+ public function isId(): bool {}
/**
* Creates a new {@see DOMAttr} object
@@ -1523,8 +1563,7 @@ public function isId() {}
*/
public function __construct(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
- #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
- = ''
+ #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = ''
) {}
}
@@ -1609,7 +1648,8 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
* @return string The value of the attribute, or an empty string if no attribute with the
* given name is found.
*/
- public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
+ #[TentativeType]
+ public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): string {}
/**
* Adds new attribute
@@ -1635,7 +1675,8 @@ public function setAttribute(
*
* @return bool true on success or false on failure.
*/
- public function removeAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
+ #[TentativeType]
+ public function removeAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}
/**
* Returns attribute node
@@ -1677,7 +1718,8 @@ public function removeAttributeNode(DOMAttr $attr) {}
* @return DOMNodeList This function returns a new instance of the class
* DOMNodeList of all matched elements.
*/
- public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
+ #[TentativeType]
+ public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {}
/**
* Returns value of attribute
@@ -1692,10 +1734,11 @@ public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'
* given localName and namespaceURI
* is found.
*/
+ #[TentativeType]
public function getAttributeNS(
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
- ) {}
+ ): string {}
/**
* Adds new attribute
@@ -1711,11 +1754,12 @@ public function getAttributeNS(
*
* @return void
*/
+ #[TentativeType]
public function setAttributeNS(
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value
- ) {}
+ ): void {}
/**
* Removes attribute
@@ -1728,10 +1772,11 @@ public function setAttributeNS(
*
* @return bool true on success or false on failure.
*/
+ #[TentativeType]
public function removeAttributeNS(
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
- ) {}
+ ): void {}
/**
* Returns attribute node
@@ -1771,10 +1816,11 @@ public function setAttributeNodeNS(DOMAttr $attr) {}
* DOMNodeList of all matched elements in the order in
* which they are encountered in a preorder traversal of this element tree.
*/
+ #[TentativeType]
public function getElementsByTagNameNS(
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
- ) {}
+ ): DOMNodeList {}
/**
* Checks to see if attribute exists
@@ -1784,7 +1830,8 @@ public function getElementsByTagNameNS(
*
* @return bool true on success or false on failure.
*/
- public function hasAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
+ #[TentativeType]
+ public function hasAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {}
/**
* Checks to see if attribute exists
@@ -1797,10 +1844,11 @@ public function hasAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], defau
*
* @return bool true on success or false on failure.
*/
+ #[TentativeType]
public function hasAttributeNS(
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName
- ) {}
+ ): bool {}
/**
* Declares the attribute specified by name to be of type ID
@@ -1814,10 +1862,11 @@ public function hasAttributeNS(
*
* @return void
*/
+ #[TentativeType]
public function setIdAttribute(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId
- ) {}
+ ): void {}
/**
* Declares the attribute specified by local name and namespace URI to be of type ID
@@ -1834,11 +1883,12 @@ public function setIdAttribute(
*
* @return void
*/
+ #[TentativeType]
public function setIdAttributeNS(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId
- ) {}
+ ): void {}
/**
* Declares the attribute specified by node to be of type ID
@@ -1852,37 +1902,38 @@ public function setIdAttributeNS(
*
* @return void
*/
- public function setIdAttributeNode(DOMAttr $attr, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId) {}
+ #[TentativeType]
+ public function setIdAttributeNode(DOMAttr $attr, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId): void {}
/**
* {@inheritDoc}
*/
- public function remove() {}
+ public function remove(): void {}
/**
* {@inheritDoc}
*/
- public function before(...$nodes) {}
+ public function before(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function after(...$nodes) {}
+ public function after(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function replaceWith(...$nodes) {}
+ public function replaceWith(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function append(...$nodes) {}
+ public function append(...$nodes): void {}
/**
* {@inheritDoc}
*/
- public function prepend(...$nodes) {}
+ public function prepend(...$nodes): void {}
/**
* Creates a new DOMElement object
@@ -1929,9 +1980,11 @@ public function splitText(#[LanguageLevelTypeAware(['8.0' => 'int'], default: ''
* @link https://php.net/manual/en/domtext.iswhitespaceinelementcontent.php
* @return bool true on success or false on failure.
*/
- public function isWhitespaceInElementContent() {}
+ #[TentativeType]
+ public function isWhitespaceInElementContent(): bool {}
- public function isElementContentWhitespace() {}
+ #[TentativeType]
+ public function isElementContentWhitespace(): bool {}
/**
* @param $content
@@ -2262,10 +2315,11 @@ public function __construct(DOMDocument $document, #[PhpStormStubsElementAvailab
*
* @return bool true on success or false on failure.
*/
+ #[TentativeType]
public function registerNamespace(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace
- ) {}
+ ): bool {}
/**
* Evaluates the given XPath expression
@@ -2285,11 +2339,12 @@ public function registerNamespace(
* will return an empty DOMNodeList. The return is false if the expression
* is malformed or the contextnode is invalid.
*/
+ #[TentativeType]
public function query(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression,
#[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true
- ) {}
+ ): mixed {}
/**
* Evaluates the given XPath expression and returns a typed result if possible.
@@ -2309,11 +2364,12 @@ public function query(
* @return mixed a typed result if possible or a DOMNodeList
* containing all nodes matching the given XPath expression.
*/
+ #[TentativeType]
public function evaluate(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression,
#[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null,
#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true
- ) {}
+ ): mixed {}
/**
* Register PHP functions as XPath functions
@@ -2347,7 +2403,7 @@ interface DOMParentNode
* @return void
* @since 8.0
*/
- public function append(...$nodes);
+ public function append(...$nodes): void;
/**
* Prepends one or many nodes to the list of children before the first
@@ -2357,7 +2413,7 @@ public function append(...$nodes);
* @return void
* @since 8.0
*/
- public function prepend(...$nodes);
+ public function prepend(...$nodes): void;
}
/**
@@ -2374,7 +2430,7 @@ interface DOMChildNode
* @return void
* @since 8.0
*/
- public function remove();
+ public function remove(): void;
/**
* Add passed node(s) before the current node
@@ -2383,7 +2439,7 @@ public function remove();
* @return void
* @since 8.0
*/
- public function before(...$nodes);
+ public function before(...$nodes): void;
/**
* Add passed node(s) after the current node
@@ -2392,7 +2448,7 @@ public function before(...$nodes);
* @return void
* @since 8.0
*/
- public function after(...$nodes);
+ public function after(...$nodes): void;
/**
* Replace current node with new node(s), a combination
@@ -2402,5 +2458,5 @@ public function after(...$nodes);
* @return void
* @since 8.0
*/
- public function replaceWith(...$nodes);
+ public function replaceWith(...$nodes): void;
}
diff --git a/fileinfo/fileinfo.php b/fileinfo/fileinfo.php
index 513361120..96c0472b6 100644
--- a/fileinfo/fileinfo.php
+++ b/fileinfo/fileinfo.php
@@ -2,8 +2,9 @@
// Start of fileinfo v.1.0.5
-use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
+use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
+use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;
class finfo
@@ -54,11 +55,12 @@ public function set_flags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: ''
* filename argument, or FALSE if an error occurred.
*/
#[Pure]
+ #[TentativeType]
public function file(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename = null,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,
$context = null
- ) {}
+ ): string|false {}
/**
* (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)
@@ -76,11 +78,12 @@ public function file(
* argument, or FALSE if an error occurred.
*/
#[Pure]
+ #[TentativeType]
public function buffer(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string = null,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,
$context = null
- ) {}
+ ): string|false {}
}
/**
diff --git a/hash/hash.php b/hash/hash.php
index a48eff697..8b0fc7de0 100644
--- a/hash/hash.php
+++ b/hash/hash.php
@@ -447,15 +447,18 @@ function mhash(int $algo, string $data, ?string $key): string|false {}
*/
define('MHASH_XXH128', 41);
+/**
+ * @since 7.2
+ */
class HashContext
{
private function __construct() {}
- public function __serialize() {}
+ public function __serialize(): array {}
/**
* @param array $data
*/
- public function __unserialize(#[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $data) {}
+ public function __unserialize(#[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $data): void {}
}
// End of hash v.1.0
diff --git a/intl/IntlChar.php b/intl/IntlChar.php
index 217b530ff..39811a548 100644
--- a/intl/IntlChar.php
+++ b/intl/IntlChar.php
@@ -1,6 +1,7 @@
'int|string'], default: '')] $codepoint,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property
- ) {}
+ ): ?bool {}
/**
* @link https://php.net/manual/en/intlchar.charage.php
@@ -698,7 +700,8 @@ public static function hasBinaryProperty(
* Or NULL if codepoint is out of bounds.
* @since 7.0
*/
- public static function charAge(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function charAge(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?array {}
/**
* @link https://php.net/manual/en/intlchar.chardigitvalue.php
@@ -708,7 +711,8 @@ public static function charAge(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* Or NULL if codepoint is out of bounds.
* @since 7.0
*/
- public static function charDigitValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function charDigitValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
/**
* Get bidirectional category value for a code point
@@ -745,7 +749,8 @@ public static function charDigitValue(#[LanguageLevelTypeAware(['8.0' => 'int|st
* Or NULL if codepoint is out of bounds.
* @since 7.0
*/
- public static function charDirection(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function charDirection(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
/**
* @link https://php.net/manual/en/intlchar.charfromname.php
@@ -763,10 +768,11 @@ public static function charDirection(#[LanguageLevelTypeAware(['8.0' => 'int|str
* @return int|null The Unicode value of the code point with the given name (as an integer), or NULL if there is no such code point.
* @since 7.0
*/
+ #[TentativeType]
public static function charFromName(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
- ) {}
+ ): ?int {}
/**
* @link https://php.net/manual/en/intlchar.charmirror.php
@@ -776,7 +782,8 @@ public static function charFromName(
* The return type will be integer unless the code point was passed as a UTF-8 string, in which case a string will be returned.
* Or NULL if codepoint will be out of bound.
*/
- public static function charMirror(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function charMirror(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
/**
* Retrieve the name of a Unicode character
@@ -793,10 +800,11 @@ public static function charMirror(#[LanguageLevelTypeAware(['8.0' => 'int|string
* @return string|null The corresponding name, or an empty string if there is no name for this character, or NULL if codepoint is out of bounds.
* @since 7.0
*/
+ #[TentativeType]
public static function charName(
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
- ) {}
+ ): ?string {}
/**
* Get the general category value for a code point
@@ -839,7 +847,8 @@ public static function charName(
* Or NULL if codepoint is out of bound.
'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function charType(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
/**
* Return Unicode character by code point value
@@ -849,7 +858,8 @@ public static function charType(#[LanguageLevelTypeAware(['8.0' => 'int|string']
* Or NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function chr(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function chr(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?string {}
/**
* Get the decimal digit value of a code point for a given radix
@@ -861,10 +871,11 @@ public static function chr(#[LanguageLevelTypeAware(['8.0' => 'int|string'], def
* or NULL if codepoint is out of bound.
* @since 7.0
*/
+ #[TentativeType]
public static function digit(
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $base = 10
- ) {}
+ ): int|false|null {}
/**
* Enumerate all assigned Unicode characters within a range
@@ -889,12 +900,13 @@ public static function digit(
*
* @since 7.0
*/
+ #[TentativeType]
public static function enumCharNames(
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $start,
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $end,
#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME
- ) {}
+ ): ?bool {}
/**
* Enumerate all code points with their Unicode general categories
@@ -909,7 +921,8 @@ public static function enumCharNames(
*
* @since 7.0
*/
- public static function enumCharTypes(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback = null) {}
+ #[TentativeType]
+ public static function enumCharTypes(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback = null): void {}
/**
* Perform case folding on a code point
@@ -920,10 +933,11 @@ public static function enumCharTypes(#[LanguageLevelTypeAware(['8.0' => 'callabl
* Returns NULL if codepoint is out of bound.
* @since 7.0
*/
+ #[TentativeType]
public static function foldCase(
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = IntlChar::FOLD_CASE_DEFAULT
- ) {}
+ ): string|int|null {}
/**
* Get character representation for a given digit and radix
@@ -933,10 +947,11 @@ public static function foldCase(
* @return int The character representation (as a string) of the specified digit in the specified radix.
* @since 7.0
*/
+ #[TentativeType]
public static function forDigit(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $digit,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $base = 10
- ) {}
+ ): int {}
/**
* Get the paired bracket character for a code point
@@ -947,7 +962,8 @@ public static function forDigit(
* Or NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function getBidiPairedBracket(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function getBidiPairedBracket(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
/**
* Get the Unicode allocation block containing a code point
@@ -957,7 +973,8 @@ public static function getBidiPairedBracket(#[LanguageLevelTypeAware(['8.0' => '
* See the IntlChar::BLOCK_CODE_* constants for possible return values.
* @since 7.0
*/
- public static function getBlockCode(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function getBlockCode(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
/**
* Get the combining class of a code point
@@ -967,7 +984,8 @@ public static function getBlockCode(#[LanguageLevelTypeAware(['8.0' => 'int|stri
* Or NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function getCombiningClass(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function getCombiningClass(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?int {}
/**
* Get the FC_NFKC_Closure property for a code point
@@ -978,7 +996,8 @@ public static function getCombiningClass(#[LanguageLevelTypeAware(['8.0' => 'int
* or FALSE if there was an error.
* @since 7.0
*/
- public static function getFC_NFKC_Closure(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function getFC_NFKC_Closure(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|false|null {}
/**
* Get the max value for a Unicode property
@@ -987,7 +1006,8 @@ public static function getFC_NFKC_Closure(#[LanguageLevelTypeAware(['8.0' => 'in
* @return int The maximum value returned by {@see IntlChar::getIntPropertyValue()} for a Unicode property. <=0 if the property selector is out of range.
* @since 7.0
*/
- public static function getIntPropertyMaxValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property) {}
+ #[TentativeType]
+ public static function getIntPropertyMaxValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): int {}
/**
* Get the min value for a Unicode property
@@ -996,7 +1016,8 @@ public static function getIntPropertyMaxValue(#[LanguageLevelTypeAware(['8.0' =>
* @return int The minimum value returned by {@see IntlChar::getIntPropertyValue()} for a Unicode property. 0 if the property selector is out of range.
* @since 7.0
*/
- public static function getIntPropertyMinValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property) {}
+ #[TentativeType]
+ public static function getIntPropertyMinValue(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property): int {}
/**
* Get the value for a Unicode property for a code point
@@ -1022,10 +1043,11 @@ public static function getIntPropertyMinValue(#[LanguageLevelTypeAware(['8.0' =>
*
* @since 7.0
*/
+ #[TentativeType]
public static function getIntPropertyValue(
#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property
- ) {}
+ ): ?int {}
/**
* Get the numeric value for a Unicode code point
@@ -1034,7 +1056,8 @@ public static function getIntPropertyValue(
* @return float|null Numeric value of codepoint, or float(-123456789) if none is defined, or NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function getNumericValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function getNumericValue(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?float {}
/**
* Get the property constant value for a given property name
@@ -1043,7 +1066,8 @@ public static function getNumericValue(#[LanguageLevelTypeAware(['8.0' => 'int|s
* @return int Returns an IntlChar::PROPERTY_ constant value, or IntlChar::PROPERTY_INVALID_CODE if the given name does not match any property.
* @since 7.0
*/
- public static function getPropertyEnum(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias) {}
+ #[TentativeType]
+ public static function getPropertyEnum(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias): int {}
/**
* Get the Unicode name for a property
@@ -1064,10 +1088,11 @@ public static function getPropertyEnum(#[LanguageLevelTypeAware(['8.0' => 'strin
*
* @since 7.0
*/
+ #[TentativeType]
public static function getPropertyName(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::LONG_PROPERTY_NAME
- ) {}
+ ): string|false {}
/**
* Get the property value for a given value name
@@ -1078,10 +1103,11 @@ public static function getPropertyName(
* @return int Returns the corresponding value integer, or IntlChar::PROPERTY_INVALID_CODE if the given name does not match any value of the given property, or if the property is invalid.
* @since 7.0
*/
+ #[TentativeType]
public static function getPropertyValueEnum(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name
- ) {}
+ ): int {}
/**
* Get the Unicode name for a property value
@@ -1111,11 +1137,12 @@ public static function getPropertyValueEnum(
* If a given nameChoice returns FALSE, then all larger values of nameChoice will return FALSE, with one exception: if FALSE is returned for IntlChar::SHORT_PROPERTY_NAME, then IntlChar::LONG_PROPERTY_NAME (and higher) may still return a non-FALSE value.
* @since 7.0
*/
+ #[TentativeType]
public static function getPropertyValueName(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $property,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $value,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::LONG_PROPERTY_NAME
- ) {}
+ ): string|false {}
/**
* Get the Unicode version
@@ -1123,7 +1150,8 @@ public static function getPropertyValueName(
* @return array An array containing the Unicode version number.
* @since 7.0
*/
- public static function getUnicodeVersion() {}
+ #[TentativeType]
+ public static function getUnicodeVersion(): array {}
/**
* Check if code point is an alphanumeric character
@@ -1132,7 +1160,8 @@ public static function getUnicodeVersion() {}
* @return bool|null Returns TRUE if codepoint is an alphanumeric character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isalnum(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isalnum(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is a letter character
@@ -1141,7 +1170,9 @@ public static function isalnum(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a letter character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isalpha(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isalpha(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is a base character
* @link https://php.net/manual/en/intlchar.isbase.php
@@ -1149,7 +1180,9 @@ public static function isalpha(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a base character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isbase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isbase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is a "blank" or "horizontal space" character
* @link https://php.net/manual/en/intlchar.isblank.php
@@ -1157,7 +1190,8 @@ public static function isbase(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is either a "blank" or "horizontal space" character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isblank(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isblank(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is a control character
@@ -1166,7 +1200,8 @@ public static function isblank(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a control character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function iscntrl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function iscntrl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check whether the code point is defined
@@ -1175,7 +1210,8 @@ public static function iscntrl(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a defined character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isdefined(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isdefined(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is a digit character
@@ -1184,7 +1220,9 @@ public static function isdefined(#[LanguageLevelTypeAware(['8.0' => 'int|string'
* @return bool|null Returns TRUE if codepoint is a digit character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is a graphic character
* @link https://php.net/manual/en/intlchar.isgraph.php
@@ -1192,7 +1230,9 @@ public static function isdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a "graphic" character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isgraph(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isgraph(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is an ignorable character
* @link https://php.net/manual/en/intlchar.isidignorable.php
@@ -1200,7 +1240,9 @@ public static function isgraph(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is ignorable in identifiers, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isIDIgnorable(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isIDIgnorable(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is permissible in an identifier
* @link https://php.net/manual/en/intlchar.isidpart.php
@@ -1208,7 +1250,8 @@ public static function isIDIgnorable(#[LanguageLevelTypeAware(['8.0' => 'int|str
* @return bool|null Returns TRUE if codepoint is the code point may occur in an identifier, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is permissible as the first character in an identifier
@@ -1217,7 +1260,9 @@ public static function isIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string']
* @return bool|null Returns TRUE if codepoint may start an identifier, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is an ISO control code
* @link https://php.net/manual/en/intlchar.isisocontrol.php
@@ -1225,7 +1270,9 @@ public static function isIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'
* @return bool|null Returns TRUE if codepoint is an ISO control code, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isISOControl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isISOControl(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is permissible in a Java identifier
* @link https://php.net/manual/en/intlchar.isjavaidpart.php
@@ -1233,7 +1280,9 @@ public static function isISOControl(#[LanguageLevelTypeAware(['8.0' => 'int|stri
* @return bool|null Returns TRUE if codepoint may occur in a Java identifier, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isJavaIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isJavaIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is permissible as the first character in a Java identifier
* @link https://php.net/manual/en/intlchar.isjavaidstart.php
@@ -1241,7 +1290,9 @@ public static function isJavaIDPart(#[LanguageLevelTypeAware(['8.0' => 'int|stri
* @return bool|null Returns TRUE if codepoint may start a Java identifier, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isJavaIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isJavaIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is a space character according to Java
* @link https://php.net/manual/en/intlchar.isjavaspacechar.php
@@ -1249,7 +1300,8 @@ public static function isJavaIDStart(#[LanguageLevelTypeAware(['8.0' => 'int|str
* @return bool|null Returns TRUE if codepoint is a space character according to Java, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isJavaSpaceChar(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isJavaSpaceChar(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is a lowercase letter
@@ -1259,7 +1311,9 @@ public static function isJavaSpaceChar(#[LanguageLevelTypeAware(['8.0' => 'int|s
* @return bool|null Returns TRUE if codepoint is an Ll lowercase letter, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function islower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function islower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point has the Bidi_Mirrored property
* @link https://php.net/manual/en/intlchar.ismirrored.php
@@ -1267,7 +1321,8 @@ public static function islower(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint has the Bidi_Mirrored property, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isMirrored(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isMirrored(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is a printable character
@@ -1276,7 +1331,8 @@ public static function isMirrored(#[LanguageLevelTypeAware(['8.0' => 'int|string
* @return bool|null Returns TRUE if codepoint is a printable character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isprint(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isprint(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is punctuation character
@@ -1286,7 +1342,9 @@ public static function isprint(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a punctuation character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function ispunct(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function ispunct(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is a space character
* @link https://php.net/manual/en/intlchar.isspace.php
@@ -1294,7 +1352,9 @@ public static function ispunct(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a space character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isspace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isspace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is a titlecase letter
* @link https://php.net/manual/en/intlchar.istitle.php
@@ -1302,7 +1362,8 @@ public static function isspace(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint is a titlecase letter, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function istitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function istitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point has the Alphabetic Unicode property
@@ -1311,7 +1372,9 @@ public static function istitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint has the Alphabetic Unicode property, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isUAlphabetic(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isUAlphabetic(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point has the Lowercase Unicode property
* @link https://php.net/manual/en/intlchar.isulowercase.php
@@ -1319,7 +1382,9 @@ public static function isUAlphabetic(#[LanguageLevelTypeAware(['8.0' => 'int|str
* @return bool|null Returns TRUE if codepoint has the Lowercase Unicode property, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isULowercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isULowercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point has the general category "Lu" (uppercase letter)
* @link https://php.net/manual/en/intlchar.isupper.php
@@ -1328,7 +1393,9 @@ public static function isULowercase(#[LanguageLevelTypeAware(['8.0' => 'int|stri
* @return bool|null Returns TRUE if codepoint is an Lu uppercase letter, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point has the Uppercase Unicode property
* @link https://php.net/manual/en/intlchar.isuuppercase.php
@@ -1336,7 +1403,9 @@ public static function isupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* @return bool|null Returns TRUE if codepoint has the Uppercase Unicode property, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isUUppercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isUUppercase(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point has the White_Space Unicode property
* @link https://php.net/manual/en/intlchar.isuwhitespace.php
@@ -1344,7 +1413,9 @@ public static function isUUppercase(#[LanguageLevelTypeAware(['8.0' => 'int|stri
* @return bool|null Returns TRUE if codepoint has the White_Space Unicode property, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isUWhiteSpace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isUWhiteSpace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
+
/**
* Check if code point is a whitespace character according to ICU
* @link https://php.net/manual/en/intlchar.iswhitespace.php
@@ -1352,7 +1423,8 @@ public static function isUWhiteSpace(#[LanguageLevelTypeAware(['8.0' => 'int|str
* @return bool|null Returns TRUE if codepoint is a whitespace character according to ICU, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isWhitespace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isWhitespace(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Check if code point is a hexadecimal digit
@@ -1360,7 +1432,8 @@ public static function isWhitespace(#[LanguageLevelTypeAware(['8.0' => 'int|stri
* @return bool|null Returns TRUE if codepoint is a hexadecimal character, FALSE if not, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function isxdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function isxdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): ?bool {}
/**
* Return Unicode code point value of character
@@ -1369,7 +1442,8 @@ public static function isxdigit(#[LanguageLevelTypeAware(['8.0' => 'int|string']
* @return int|null Returns the Unicode code point value as an integer, NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function ord(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $character) {}
+ #[TentativeType]
+ public static function ord(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $character): ?int {}
/**
* Make Unicode character lowercase
@@ -1380,7 +1454,9 @@ public static function ord(#[LanguageLevelTypeAware(['8.0' => 'int|string'], def
* Or NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function tolower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function tolower(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
+
/**
* Make Unicode character titlecase
* @link https://php.net/manual/en/intlchar.totitle.php
@@ -1390,7 +1466,8 @@ public static function tolower(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* Or NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function totitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function totitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
/**
* Make Unicode character uppercase
@@ -1401,5 +1478,6 @@ public static function totitle(#[LanguageLevelTypeAware(['8.0' => 'int|string'],
* Or NULL if codepoint is out of bound.
* @since 7.0
*/
- public static function toupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint) {}
+ #[TentativeType]
+ public static function toupper(#[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $codepoint): string|int|null {}
}
diff --git a/intl/IntlDatePatternGenerator.php b/intl/IntlDatePatternGenerator.php
index 29e458d5e..7c17c151b 100644
--- a/intl/IntlDatePatternGenerator.php
+++ b/intl/IntlDatePatternGenerator.php
@@ -7,7 +7,7 @@ class IntlDatePatternGenerator
{
public function __construct(?string $locale = null) {}
- public static function create(?string $locale = null) {}
+ public static function create(?string $locale = null): ?IntlDatePatternGenerator {}
- public function getBestPattern(string $skeleton) {}
+ public function getBestPattern(string $skeleton): string|false {}
}
diff --git a/intl/intl.php b/intl/intl.php
index aa13666cc..bfe0c5647 100644
--- a/intl/intl.php
+++ b/intl/intl.php
@@ -6,3262 +6,3400 @@
use JetBrains\PhpStorm\ExpectedValues as EV;
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as TypeAware;
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as ElementAvailable;
+use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;
class Collator
{
- public const DEFAULT_VALUE = -1;
- public const PRIMARY = 0;
- public const SECONDARY = 1;
- public const TERTIARY = 2;
- public const DEFAULT_STRENGTH = 2;
- public const QUATERNARY = 3;
- public const IDENTICAL = 15;
- public const OFF = 16;
- public const ON = 17;
- public const SHIFTED = 20;
- public const NON_IGNORABLE = 21;
- public const LOWER_FIRST = 24;
- public const UPPER_FIRST = 25;
-
- /**
- *
- * Sort strings with different accents from the back of the string. This
- * attribute is automatically set to
- * On
- * for the French locales and a few others. Users normally would not need
- * to explicitly set this attribute. There is a string comparison
- * performance cost when it is set On,
- * but sort key length is unaffected. Possible values are:
- * Collator::ON
- * Collator::OFF(default)
- * Collator::DEFAULT_VALUE
- *
- *
- * FRENCH_COLLATION rules
- *
- * F=OFF cote < coté < côte < côté
- * F=ON cote < côte < coté < côté
- *
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const FRENCH_COLLATION = 0;
-
- /**
- *
- * The Alternate attribute is used to control the handling of the so called
- * variable characters in the UCA: whitespace, punctuation and symbols. If
- * Alternate is set to NonIgnorable
- * (N), then differences among these characters are of the same importance
- * as differences among letters. If Alternate is set to
- * Shifted
- * (S), then these characters are of only minor importance. The
- * Shifted value is often used in combination with
- * Strength
- * set to Quaternary. In such a case, whitespace, punctuation, and symbols
- * are considered when comparing strings, but only if all other aspects of
- * the strings (base letters, accents, and case) are identical. If
- * Alternate is not set to Shifted, then there is no difference between a
- * Strength of 3 and a Strength of 4. For more information and examples,
- * see Variable_Weighting in the
- * UCA.
- * The reason the Alternate values are not simply
- * On and Off
- * is that additional Alternate values may be added in the future. The UCA
- * option Blanked is expressed with Strength set to 3, and Alternate set to
- * Shifted. The default for most locales is NonIgnorable. If Shifted is
- * selected, it may be slower if there are many strings that are the same
- * except for punctuation; sort key length will not be affected unless the
- * strength level is also increased.
- *
- *
- * Possible values are:
- * Collator::NON_IGNORABLE(default)
- * Collator::SHIFTED
- * Collator::DEFAULT_VALUE
- *
- *
- * ALTERNATE_HANDLING rules
- *
- * S=3, A=N di Silva < Di Silva < diSilva < U.S.A. < USA
- * S=3, A=S di Silva = diSilva < Di Silva < U.S.A. = USA
- * S=4, A=S di Silva < diSilva < Di Silva < U.S.A. < USA
- *
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const ALTERNATE_HANDLING = 1;
-
- /**
- *
- * The Case_First attribute is used to control whether uppercase letters
- * come before lowercase letters or vice versa, in the absence of other
- * differences in the strings. The possible values are
- * Uppercase_First
- * (U) and Lowercase_First
- * (L), plus the standard Default
- * and Off.
- * There is almost no difference between the Off and Lowercase_First
- * options in terms of results, so typically users will not use
- * Lowercase_First: only Off or Uppercase_First. (People interested in the
- * detailed differences between X and L should consult the Collation
- * Customization). Specifying either L or U won't affect string comparison
- * performance, but will affect the sort key length.
- *
- *
- * Possible values are:
- * Collator::OFF(default)
- * Collator::LOWER_FIRST
- * Collator::UPPER_FIRST
- * Collator:DEFAULT
- *
- *
- * CASE_FIRST rules
- *
- * C=X or C=L "china" < "China" < "denmark" < "Denmark"
- * C=U "China" < "china" < "Denmark" < "denmark"
- *
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const CASE_FIRST = 2;
-
- /**
- *
- * The Case_Level attribute is used when ignoring accents but not case. In
- * such a situation, set Strength to be Primary,
- * and Case_Level to be On.
- * In most locales, this setting is Off by default. There is a small
- * string comparison performance and sort key impact if this attribute is
- * set to be On.
- *
- *
- * Possible values are:
- * Collator::OFF(default)
- * Collator::ON
- * Collator::DEFAULT_VALUE
- *
- *
- * CASE_LEVEL rules
- *
- * S=1, E=X role = Role = rôle
- * S=1, E=O role = rôle < Role
- *
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const CASE_LEVEL = 3;
-
- /**
- *
- * The Normalization setting determines whether text is thoroughly
- * normalized or not in comparison. Even if the setting is off (which is
- * the default for many locales), text as represented in common usage will
- * compare correctly (for details, see UTN #5). Only if the accent marks
- * are in noncanonical order will there be a problem. If the setting is
- * On,
- * then the best results are guaranteed for all possible text input.
- * There is a medium string comparison performance cost if this attribute
- * is On,
- * depending on the frequency of sequences that require normalization.
- * There is no significant effect on sort key length. If the input text is
- * known to be in NFD or NFKD normalization forms, there is no need to
- * enable this Normalization option.
- *
- *
- * Possible values are:
- * Collator::OFF(default)
- * Collator::ON
- * Collator::DEFAULT_VALUE
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const NORMALIZATION_MODE = 4;
-
- /**
- *
- * The ICU Collation Service supports many levels of comparison (named
- * "Levels", but also known as "Strengths"). Having these categories
- * enables ICU to sort strings precisely according to local conventions.
- * However, by allowing the levels to be selectively employed, searching
- * for a string in text can be performed with various matching conditions.
- * For more detailed information, see
- * collator_set_strength chapter.
- *
- *
- * Possible values are:
- * Collator::PRIMARY
- * Collator::SECONDARY
- * Collator::TERTIARY(default)
- * Collator::QUATERNARY
- * Collator::IDENTICAL
- * Collator::DEFAULT_VALUE
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const STRENGTH = 5;
-
- /**
- *
- * Compatibility with JIS x 4061 requires the introduction of an additional
- * level to distinguish Hiragana and Katakana characters. If compatibility
- * with that standard is required, then this attribute should be set
- * On,
- * and the strength set to Quaternary. This will affect sort key length
- * and string comparison string comparison performance.
- *
- *
- * Possible values are:
- * Collator::OFF(default)
- * Collator::ON
- * Collator::DEFAULT_VALUE
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const HIRAGANA_QUATERNARY_MODE = 6;
-
- /**
- *
- * When turned on, this attribute generates a collation key for the numeric
- * value of substrings of digits. This is a way to get '100' to sort AFTER
- * '2'.
- *
- *
- * Possible values are:
- * Collator::OFF(default)
- * Collator::ON
- * Collator::DEFAULT_VALUE
- *
- * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
- */
- public const NUMERIC_COLLATION = 7;
- public const SORT_REGULAR = 0;
- public const SORT_STRING = 1;
- public const SORT_NUMERIC = 2;
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Create a collator
- * @link https://php.net/manual/en/collator.construct.php
- * @param string $locale
- */
- #[Pure]
- public function __construct(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Create a collator
- * @link https://php.net/manual/en/collator.create.php
- * @param string $locale
- * The locale containing the required collation rules. Special values for
- * locales can be passed in - if null is passed for the locale, the
- * default locale collation rules will be used. If empty string ("") or
- * "root" are passed, UCA rules will be used.
- *
- * @return Collator|null Return new instance of Collator object, or NULL
- * on error.
- */
- public static function create(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Compare two Unicode strings
- * @link https://php.net/manual/en/collator.compare.php
- * @param string $string1
- * The first string to compare.
- *
- * @param string $string2
- * The second string to compare.
- *
- * @return int Return comparison result:
- *
- *
- * 1 if str1 is greater than
- * str2 ;
- *
- *
- * 0 if str1 is equal to
- * str2;
- *
- *
- * -1 if str1 is less than
- * str2 .
- *
- * On error
- * boolean
- * FALSE
- * is returned.
- */
- #[Pure]
- public function compare(
- #[TypeAware(['8.0' => 'string'], default: '')] $string1,
- #[TypeAware(['8.0' => 'string'], default: '')] $string2
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Sort array using specified collator
- * @link https://php.net/manual/en/collator.sort.php
- * @param string[] &$array
- * Array of strings to sort.
- *
- * @param int $flags [optional]
- * Optional sorting type, one of the following:
- *
- *
- * Collator::SORT_REGULAR
- * - compare items normally (don't change types)
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function sort(
- array &$array,
- #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Sort array using specified collator and sort keys
- * @link https://php.net/manual/en/collator.sortwithsortkeys.php
- * @param string[] &$array Array of strings to sort
- * @return bool TRUE on success or FALSE on failure.
- */
- public function sortWithSortKeys(array &$array) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Sort array maintaining index association
- * @link https://php.net/manual/en/collator.asort.php
- * @param string[] &$array Array of strings to sort.
- * @param int $flags [optional]
- * Optional sorting type, one of the following:
- * Collator::SORT_REGULAR
- * - compare items normally (don't change types)
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function asort(
- array &$array,
- #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get collation attribute value
- * @link https://php.net/manual/en/collator.getattribute.php
- * @param int $attribute
- * Attribute to get value for.
- *
- * @return int|false Attribute value, or boolean FALSE on error.
- */
- #[Pure]
- public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set collation attribute
- * @link https://php.net/manual/en/collator.setattribute.php
- * @param int $attribute Attribute.
- * @param int $value
- * Attribute value.
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setAttribute(
- #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
- #[TypeAware(['8.0' => 'int'], default: '')] $value
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get current collation strength
- * @link https://php.net/manual/en/collator.getstrength.php
- * @return int|false current collation strength, or boolean FALSE on error.
- */
- #[Pure]
- public function getStrength() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set collation strength
- * @link https://php.net/manual/en/collator.setstrength.php
- * @param int $strength Strength to set.
- *
- * Possible values are:
- * Collator::PRIMARY
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setStrength(#[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::PRIMARY])] $strength) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get collator's last error code
- * @link https://php.net/manual/en/collator.geterrorcode.php
- * @return int Error code returned by the last Collator API function call.
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the locale name of the collator
- * @link https://php.net/manual/en/collator.getlocale.php
- * @param int $type [optional]
- * You can choose between valid and actual locale (
- * Locale::VALID_LOCALE and
- * Locale::ACTUAL_LOCALE,
- * respectively). The default is the actual locale.
- *
- * @return string Real locale name from which the collation data comes. If the collator was
- * instantiated from rules or an error occurred, returns
- * boolean FALSE.
- */
- #[Pure]
- public function getLocale(
- #[TypeAware(['8.0' => 'int'], default: '')]
- #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])]
- $type = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get text for collator's last error code
- * @link https://php.net/manual/en/collator.geterrormessage.php
- * @return string Description of an error occurred in the last Collator API function call.
- */
- #[Pure]
- public function getErrorMessage() {}
-
- /**
- * (No version information available, might only be in SVN)
- * Get sorting key for a string
- * @link https://php.net/manual/en/collator.getsortkey.php
- * @param string $string
- * The string to produce the key from.
- *
- * @return string the collation key for the string. Collation keys can be compared directly instead of strings.
- */
- #[Pure]
- public function getSortKey(#[TypeAware(['8.0' => 'string'], default: '')] $string) {}
+ public const DEFAULT_VALUE = -1;
+ public const PRIMARY = 0;
+ public const SECONDARY = 1;
+ public const TERTIARY = 2;
+ public const DEFAULT_STRENGTH = 2;
+ public const QUATERNARY = 3;
+ public const IDENTICAL = 15;
+ public const OFF = 16;
+ public const ON = 17;
+ public const SHIFTED = 20;
+ public const NON_IGNORABLE = 21;
+ public const LOWER_FIRST = 24;
+ public const UPPER_FIRST = 25;
+
+ /**
+ *
+ * Sort strings with different accents from the back of the string. This
+ * attribute is automatically set to
+ * On
+ * for the French locales and a few others. Users normally would not need
+ * to explicitly set this attribute. There is a string comparison
+ * performance cost when it is set On,
+ * but sort key length is unaffected. Possible values are:
+ * Collator::ON
+ * Collator::OFF(default)
+ * Collator::DEFAULT_VALUE
+ *
+ *
+ * FRENCH_COLLATION rules
+ *
+ * F=OFF cote < coté < côte < côté
+ * F=ON cote < côte < coté < côté
+ *
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const FRENCH_COLLATION = 0;
+
+ /**
+ *
+ * The Alternate attribute is used to control the handling of the so called
+ * variable characters in the UCA: whitespace, punctuation and symbols. If
+ * Alternate is set to NonIgnorable
+ * (N), then differences among these characters are of the same importance
+ * as differences among letters. If Alternate is set to
+ * Shifted
+ * (S), then these characters are of only minor importance. The
+ * Shifted value is often used in combination with
+ * Strength
+ * set to Quaternary. In such a case, whitespace, punctuation, and symbols
+ * are considered when comparing strings, but only if all other aspects of
+ * the strings (base letters, accents, and case) are identical. If
+ * Alternate is not set to Shifted, then there is no difference between a
+ * Strength of 3 and a Strength of 4. For more information and examples,
+ * see Variable_Weighting in the
+ * UCA.
+ * The reason the Alternate values are not simply
+ * On and Off
+ * is that additional Alternate values may be added in the future. The UCA
+ * option Blanked is expressed with Strength set to 3, and Alternate set to
+ * Shifted. The default for most locales is NonIgnorable. If Shifted is
+ * selected, it may be slower if there are many strings that are the same
+ * except for punctuation; sort key length will not be affected unless the
+ * strength level is also increased.
+ *
+ *
+ * Possible values are:
+ * Collator::NON_IGNORABLE(default)
+ * Collator::SHIFTED
+ * Collator::DEFAULT_VALUE
+ *
+ *
+ * ALTERNATE_HANDLING rules
+ *
+ * S=3, A=N di Silva < Di Silva < diSilva < U.S.A. < USA
+ * S=3, A=S di Silva = diSilva < Di Silva < U.S.A. = USA
+ * S=4, A=S di Silva < diSilva < Di Silva < U.S.A. < USA
+ *
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const ALTERNATE_HANDLING = 1;
+
+ /**
+ *
+ * The Case_First attribute is used to control whether uppercase letters
+ * come before lowercase letters or vice versa, in the absence of other
+ * differences in the strings. The possible values are
+ * Uppercase_First
+ * (U) and Lowercase_First
+ * (L), plus the standard Default
+ * and Off.
+ * There is almost no difference between the Off and Lowercase_First
+ * options in terms of results, so typically users will not use
+ * Lowercase_First: only Off or Uppercase_First. (People interested in the
+ * detailed differences between X and L should consult the Collation
+ * Customization). Specifying either L or U won't affect string comparison
+ * performance, but will affect the sort key length.
+ *
+ *
+ * Possible values are:
+ * Collator::OFF(default)
+ * Collator::LOWER_FIRST
+ * Collator::UPPER_FIRST
+ * Collator:DEFAULT
+ *
+ *
+ * CASE_FIRST rules
+ *
+ * C=X or C=L "china" < "China" < "denmark" < "Denmark"
+ * C=U "China" < "china" < "Denmark" < "denmark"
+ *
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const CASE_FIRST = 2;
+
+ /**
+ *
+ * The Case_Level attribute is used when ignoring accents but not case. In
+ * such a situation, set Strength to be Primary,
+ * and Case_Level to be On.
+ * In most locales, this setting is Off by default. There is a small
+ * string comparison performance and sort key impact if this attribute is
+ * set to be On.
+ *
+ *
+ * Possible values are:
+ * Collator::OFF(default)
+ * Collator::ON
+ * Collator::DEFAULT_VALUE
+ *
+ *
+ * CASE_LEVEL rules
+ *
+ * S=1, E=X role = Role = rôle
+ * S=1, E=O role = rôle < Role
+ *
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const CASE_LEVEL = 3;
+
+ /**
+ *
+ * The Normalization setting determines whether text is thoroughly
+ * normalized or not in comparison. Even if the setting is off (which is
+ * the default for many locales), text as represented in common usage will
+ * compare correctly (for details, see UTN #5). Only if the accent marks
+ * are in noncanonical order will there be a problem. If the setting is
+ * On,
+ * then the best results are guaranteed for all possible text input.
+ * There is a medium string comparison performance cost if this attribute
+ * is On,
+ * depending on the frequency of sequences that require normalization.
+ * There is no significant effect on sort key length. If the input text is
+ * known to be in NFD or NFKD normalization forms, there is no need to
+ * enable this Normalization option.
+ *
+ *
+ * Possible values are:
+ * Collator::OFF(default)
+ * Collator::ON
+ * Collator::DEFAULT_VALUE
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const NORMALIZATION_MODE = 4;
+
+ /**
+ *
+ * The ICU Collation Service supports many levels of comparison (named
+ * "Levels", but also known as "Strengths"). Having these categories
+ * enables ICU to sort strings precisely according to local conventions.
+ * However, by allowing the levels to be selectively employed, searching
+ * for a string in text can be performed with various matching conditions.
+ * For more detailed information, see
+ * collator_set_strength chapter.
+ *
+ *
+ * Possible values are:
+ * Collator::PRIMARY
+ * Collator::SECONDARY
+ * Collator::TERTIARY(default)
+ * Collator::QUATERNARY
+ * Collator::IDENTICAL
+ * Collator::DEFAULT_VALUE
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const STRENGTH = 5;
+
+ /**
+ *
+ * Compatibility with JIS x 4061 requires the introduction of an additional
+ * level to distinguish Hiragana and Katakana characters. If compatibility
+ * with that standard is required, then this attribute should be set
+ * On,
+ * and the strength set to Quaternary. This will affect sort key length
+ * and string comparison string comparison performance.
+ *
+ *
+ * Possible values are:
+ * Collator::OFF(default)
+ * Collator::ON
+ * Collator::DEFAULT_VALUE
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const HIRAGANA_QUATERNARY_MODE = 6;
+
+ /**
+ *
+ * When turned on, this attribute generates a collation key for the numeric
+ * value of substrings of digits. This is a way to get '100' to sort AFTER
+ * '2'.
+ *
+ *
+ * Possible values are:
+ * Collator::OFF(default)
+ * Collator::ON
+ * Collator::DEFAULT_VALUE
+ *
+ * @link https://php.net/manual/en/class.collator.php#intl.collator-constants
+ */
+ public const NUMERIC_COLLATION = 7;
+ public const SORT_REGULAR = 0;
+ public const SORT_STRING = 1;
+ public const SORT_NUMERIC = 2;
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Create a collator
+ * @link https://php.net/manual/en/collator.construct.php
+ * @param string $locale
+ */
+ #[Pure]
+ public function __construct(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Create a collator
+ * @link https://php.net/manual/en/collator.create.php
+ * @param string $locale
+ * The locale containing the required collation rules. Special values for
+ * locales can be passed in - if null is passed for the locale, the
+ * default locale collation rules will be used. If empty string ("") or
+ * "root" are passed, UCA rules will be used.
+ *
+ * @return Collator|null Return new instance of Collator object, or NULL
+ * on error.
+ */
+ #[TentativeType]
+ public static function create(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?Collator {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Compare two Unicode strings
+ * @link https://php.net/manual/en/collator.compare.php
+ * @param string $string1
+ * The first string to compare.
+ *
+ * @param string $string2
+ * The second string to compare.
+ *
+ * @return int|false Return comparison result:
+ *
+ *
+ * 1 if str1 is greater than
+ * str2 ;
+ *
+ *
+ * 0 if str1 is equal to
+ * str2;
+ *
+ *
+ * -1 if str1 is less than
+ * str2 .
+ *
+ * On error
+ * boolean
+ * FALSE
+ * is returned.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function compare(
+ #[TypeAware(['8.0' => 'string'], default: '')] $string1,
+ #[TypeAware(['8.0' => 'string'], default: '')] $string2
+ ): int|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Sort array using specified collator
+ * @link https://php.net/manual/en/collator.sort.php
+ * @param string[] &$array
+ * Array of strings to sort.
+ *
+ * @param int $flags [optional]
+ * Optional sorting type, one of the following:
+ *
+ *
+ * Collator::SORT_REGULAR
+ * - compare items normally (don't change types)
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function sort(
+ array &$array,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
+ ): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Sort array using specified collator and sort keys
+ * @link https://php.net/manual/en/collator.sortwithsortkeys.php
+ * @param string[] &$array Array of strings to sort
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function sortWithSortKeys(array &$array): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Sort array maintaining index association
+ * @link https://php.net/manual/en/collator.asort.php
+ * @param string[] &$array Array of strings to sort.
+ * @param int $flags [optional]
+ * Optional sorting type, one of the following:
+ * Collator::SORT_REGULAR
+ * - compare items normally (don't change types)
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function asort(
+ array &$array,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null
+ ): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get collation attribute value
+ * @link https://php.net/manual/en/collator.getattribute.php
+ * @param int $attribute
+ * Attribute to get value for.
+ *
+ * @return int|false Attribute value, or boolean FALSE on error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): int|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set collation attribute
+ * @link https://php.net/manual/en/collator.setattribute.php
+ * @param int $attribute Attribute.
+ * @param int $value
+ * Attribute value.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setAttribute(
+ #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
+ #[TypeAware(['8.0' => 'int'], default: '')] $value
+ ): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get current collation strength
+ * @link https://php.net/manual/en/collator.getstrength.php
+ * @return int current collation strength, or boolean FALSE on error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getStrength(): int {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set collation strength
+ * @link https://php.net/manual/en/collator.setstrength.php
+ * @param int $strength Strength to set.
+ *
+ * Possible values are:
+ * Collator::PRIMARY
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ public function setStrength(#[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::PRIMARY])] $strength) {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get collator's last error code
+ * @link https://php.net/manual/en/collator.geterrorcode.php
+ * @return int|false Error code returned by the last Collator API function call.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the locale name of the collator
+ * @link https://php.net/manual/en/collator.getlocale.php
+ * @param int $type [optional]
+ * You can choose between valid and actual locale (
+ * Locale::VALID_LOCALE and
+ * Locale::ACTUAL_LOCALE,
+ * respectively). The default is the actual locale.
+ *
+ * @return string|false Real locale name from which the collation data comes. If the collator was
+ * instantiated from rules or an error occurred, returns
+ * boolean FALSE.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLocale(
+ #[TypeAware(['8.0' => 'int'], default: '')]
+ #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])]
+ $type = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get text for collator's last error code
+ * @link https://php.net/manual/en/collator.geterrormessage.php
+ * @return string|false Description of an error occurred in the last Collator API function call.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string|false {}
+
+ /**
+ * (No version information available, might only be in SVN)
+ * Get sorting key for a string
+ * @link https://php.net/manual/en/collator.getsortkey.php
+ * @param string $string
+ * The string to produce the key from.
+ *
+ * @return string|false the collation key for the string. Collation keys can be compared directly instead of strings.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getSortKey(#[TypeAware(['8.0' => 'string'], default: '')] $string): string|false {}
+}
+
+class NumberFormatter
+{
+ public const CURRENCY_ACCOUNTING = 12;
+
+ /**
+ * Decimal format defined by pattern
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PATTERN_DECIMAL = 0;
+
+ /**
+ * Decimal format
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DECIMAL = 1;
+
+ /**
+ * Currency format
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const CURRENCY = 2;
+
+ /**
+ * Percent format
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PERCENT = 3;
+
+ /**
+ * Scientific format
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const SCIENTIFIC = 4;
+
+ /**
+ * Spellout rule-based format
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const SPELLOUT = 5;
+
+ /**
+ * Ordinal rule-based format
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ORDINAL = 6;
+
+ /**
+ * Duration rule-based format
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DURATION = 7;
+
+ /**
+ * Rule-based format defined by pattern
+ * @link https://php.net/manual/en/class.locale.php#intl.locale-constants
+ */
+ public const PATTERN_RULEBASED = 9;
+
+ /**
+ * Alias for PATTERN_DECIMAL
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const IGNORE = 0;
+
+ /**
+ * Default format for the locale
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DEFAULT_STYLE = 1;
+
+ /**
+ * Rounding mode to round towards positive infinity.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUND_CEILING = 0;
+
+ /**
+ * Rounding mode to round towards negative infinity.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUND_FLOOR = 1;
+
+ /**
+ * Rounding mode to round towards zero.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUND_DOWN = 2;
+
+ /**
+ * Rounding mode to round away from zero.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUND_UP = 3;
+
+ /**
+ * Rounding mode to round towards the "nearest neighbor" unless both
+ * neighbors are equidistant, in which case, round towards the even
+ * neighbor.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUND_HALFEVEN = 4;
+
+ /**
+ * Rounding mode to round towards "nearest neighbor" unless both neighbors
+ * are equidistant, in which case round down.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUND_HALFDOWN = 5;
+
+ /**
+ * Rounding mode to round towards "nearest neighbor" unless both neighbors
+ * are equidistant, in which case round up.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUND_HALFUP = 6;
+
+ /**
+ * Pad characters inserted before the prefix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PAD_BEFORE_PREFIX = 0;
+
+ /**
+ * Pad characters inserted after the prefix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PAD_AFTER_PREFIX = 1;
+
+ /**
+ * Pad characters inserted before the suffix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PAD_BEFORE_SUFFIX = 2;
+
+ /**
+ * Pad characters inserted after the suffix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PAD_AFTER_SUFFIX = 3;
+
+ /**
+ * Parse integers only.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PARSE_INT_ONLY = 0;
+
+ /**
+ * Use grouping separator.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const GROUPING_USED = 1;
+
+ /**
+ * Always show decimal point.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DECIMAL_ALWAYS_SHOWN = 2;
+
+ /**
+ * Maximum integer digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MAX_INTEGER_DIGITS = 3;
+
+ /**
+ * Minimum integer digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MIN_INTEGER_DIGITS = 4;
+
+ /**
+ * Integer digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const INTEGER_DIGITS = 5;
+
+ /**
+ * Maximum fraction digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MAX_FRACTION_DIGITS = 6;
+
+ /**
+ * Minimum fraction digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MIN_FRACTION_DIGITS = 7;
+
+ /**
+ * Fraction digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const FRACTION_DIGITS = 8;
+
+ /**
+ * Multiplier.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MULTIPLIER = 9;
+
+ /**
+ * Grouping size.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const GROUPING_SIZE = 10;
+
+ /**
+ * Rounding Mode.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUNDING_MODE = 11;
+
+ /**
+ * Rounding increment.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ROUNDING_INCREMENT = 12;
+
+ /**
+ * The width to which the output of format() is padded.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const FORMAT_WIDTH = 13;
+
+ /**
+ * The position at which padding will take place. See pad position
+ * constants for possible argument values.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PADDING_POSITION = 14;
+
+ /**
+ * Secondary grouping size.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const SECONDARY_GROUPING_SIZE = 15;
+
+ /**
+ * Use significant digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const SIGNIFICANT_DIGITS_USED = 16;
+
+ /**
+ * Minimum significant digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MIN_SIGNIFICANT_DIGITS = 17;
+
+ /**
+ * Maximum significant digits.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MAX_SIGNIFICANT_DIGITS = 18;
+
+ /**
+ * Lenient parse mode used by rule-based formats.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const LENIENT_PARSE = 19;
+
+ /**
+ * Positive prefix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const POSITIVE_PREFIX = 0;
+
+ /**
+ * Positive suffix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const POSITIVE_SUFFIX = 1;
+
+ /**
+ * Negative prefix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const NEGATIVE_PREFIX = 2;
+
+ /**
+ * Negative suffix.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const NEGATIVE_SUFFIX = 3;
+
+ /**
+ * The character used to pad to the format width.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PADDING_CHARACTER = 4;
+
+ /**
+ * The ISO currency code.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const CURRENCY_CODE = 5;
+
+ /**
+ * The default rule set. This is only available with rule-based
+ * formatters.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DEFAULT_RULESET = 6;
+
+ /**
+ * The public rule sets. This is only available with rule-based
+ * formatters. This is a read-only attribute. The public rulesets are
+ * returned as a single string, with each ruleset name delimited by ';'
+ * (semicolon).
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PUBLIC_RULESETS = 7;
+
+ /**
+ * The decimal separator.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DECIMAL_SEPARATOR_SYMBOL = 0;
+
+ /**
+ * The grouping separator.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const GROUPING_SEPARATOR_SYMBOL = 1;
+
+ /**
+ * The pattern separator.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PATTERN_SEPARATOR_SYMBOL = 2;
+
+ /**
+ * The percent sign.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PERCENT_SYMBOL = 3;
+
+ /**
+ * Zero.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ZERO_DIGIT_SYMBOL = 4;
+
+ /**
+ * Character representing a digit in the pattern.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DIGIT_SYMBOL = 5;
+
+ /**
+ * The minus sign.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MINUS_SIGN_SYMBOL = 6;
+
+ /**
+ * The plus sign.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PLUS_SIGN_SYMBOL = 7;
+
+ /**
+ * The currency symbol.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const CURRENCY_SYMBOL = 8;
+
+ /**
+ * The international currency symbol.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const INTL_CURRENCY_SYMBOL = 9;
+
+ /**
+ * The monetary separator.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MONETARY_SEPARATOR_SYMBOL = 10;
+
+ /**
+ * The exponential symbol.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const EXPONENTIAL_SYMBOL = 11;
+
+ /**
+ * Per mill symbol.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PERMILL_SYMBOL = 12;
+
+ /**
+ * Escape padding character.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PAD_ESCAPE_SYMBOL = 13;
+
+ /**
+ * Infinity symbol.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const INFINITY_SYMBOL = 14;
+
+ /**
+ * Not-a-number symbol.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const NAN_SYMBOL = 15;
+
+ /**
+ * Significant digit symbol.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const SIGNIFICANT_DIGIT_SYMBOL = 16;
+
+ /**
+ * The monetary grouping separator.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17;
+
+ /**
+ * Derive the type from variable type
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const TYPE_DEFAULT = 0;
+
+ /**
+ * Format/parse as 32-bit integer
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const TYPE_INT32 = 1;
+
+ /**
+ * Format/parse as 64-bit integer
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const TYPE_INT64 = 2;
+
+ /**
+ * Format/parse as floating point value
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const TYPE_DOUBLE = 3;
+
+ /**
+ * Format/parse as currency value
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const TYPE_CURRENCY = 4;
+
+ /**
+ * @link https://www.php.net/manual/en/class.numberformatter.php
+ * @param string $locale
+ * @param int $style
+ * @param string $pattern [optional]
+ */
+ #[Pure]
+ public function __construct(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] $style,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
+ ) {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Create a number formatter
+ * @link https://php.net/manual/en/numberformatter.create.php
+ * @param string $locale
+ * Locale in which the number would be formatted (locale name, e.g. en_CA).
+ *
+ * @param int $style
+ * Style of the formatting, one of the
+ * format style constants. If
+ * NumberFormatter::PATTERN_DECIMAL
+ * or NumberFormatter::PATTERN_RULEBASED
+ * is passed then the number format is opened using the given pattern,
+ * which must conform to the syntax described in
+ * ICU DecimalFormat
+ * documentation or
+ * ICU RuleBasedNumberFormat
+ * documentation, respectively.
+ *
+ * @param string $pattern [optional]
+ * Pattern string if the chosen style requires a pattern.
+ *
+ * @return NumberFormatter|false NumberFormatter object or FALSE on error.
+ */
+ #[TentativeType]
+ public static function create(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED])] $style,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
+ ): ?NumberFormatter {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Format a number
+ * @link https://php.net/manual/en/numberformatter.format.php
+ * @param int|float $num
+ * The value to format. Can be integer or float,
+ * other values will be converted to a numeric value.
+ *
+ * @param int $type [optional]
+ * The
+ * formatting type to use.
+ *
+ * @return string|false the string containing formatted value, or FALSE on error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function format(
+ #[TypeAware(['8.0' => 'int|float'], default: '')] $num,
+ #[TypeAware(['8.0' => 'int'], default: '')] $type = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Parse a number
+ * @link https://php.net/manual/en/numberformatter.parse.php
+ * @param string $string
+ * @param int $type [optional]
+ * The
+ * formatting type to use. By default,
+ * NumberFormatter::TYPE_DOUBLE is used.
+ *
+ * @param int &$offset [optional]
+ * Offset in the string at which to begin parsing. On return, this value
+ * will hold the offset at which parsing ended.
+ *
+ * @return mixed The value of the parsed number or FALSE on error.
+ */
+ #[TentativeType]
+ public function parse(
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $type = NumberFormatter::TYPE_DOUBLE,
+ &$offset = null
+ ): int|float|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Format a currency value
+ * @link https://php.net/manual/en/numberformatter.formatcurrency.php
+ * @param float $amount
+ * The numeric currency value.
+ *
+ * @param string $currency
+ * The 3-letter ISO 4217 currency code indicating the currency to use.
+ *
+ * @return string String representing the formatted currency value.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function formatCurrency(
+ #[TypeAware(['8.0' => 'float'], default: '')] $amount,
+ #[TypeAware(['8.0' => 'string'], default: '')] $currency
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Parse a currency number
+ * @link https://php.net/manual/en/numberformatter.parsecurrency.php
+ * @param string $string
+ * @param string &$currency
+ * Parameter to receive the currency name (3-letter ISO 4217 currency
+ * code).
+ *
+ * @param int &$offset [optional]
+ * Offset in the string at which to begin parsing. On return, this value
+ * will hold the offset at which parsing ended.
+ *
+ * @return float|false The parsed numeric value or FALSE on error.
+ */
+ #[TentativeType]
+ public function parseCurrency(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$currency, &$offset = null): float|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set an attribute
+ * @link https://php.net/manual/en/numberformatter.setattribute.php
+ * @param int $attribute
+ * Attribute specifier - one of the
+ * numeric attribute constants.
+ *
+ * @param int $value
+ * The attribute value.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setAttribute(
+ #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
+ #[TypeAware(['8.0' => 'int|float'], default: '')] $value
+ ): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get an attribute
+ * @link https://php.net/manual/en/numberformatter.getattribute.php
+ * @param int $attribute
+ * Attribute specifier - one of the
+ * numeric attribute constants.
+ *
+ * @return int|float|false Return attribute value on success, or FALSE on error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): int|float|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set a text attribute
+ * @link https://php.net/manual/en/numberformatter.settextattribute.php
+ * @param int $attribute
+ * Attribute specifier - one of the
+ * text attribute
+ * constants.
+ *
+ * @param string $value
+ * Text for the attribute value.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setTextAttribute(
+ #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
+ #[TypeAware(['8.0' => 'string'], default: '')] $value
+ ): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get a text attribute
+ * @link https://php.net/manual/en/numberformatter.gettextattribute.php
+ * @param int $attribute
+ * Attribute specifier - one of the
+ * text attribute constants.
+ *
+ * @return string|false Return attribute value on success, or FALSE on error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getTextAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set a symbol value
+ * @link https://php.net/manual/en/numberformatter.setsymbol.php
+ * @param int $symbol
+ * Symbol specifier, one of the
+ * format symbol constants.
+ *
+ * @param string $value
+ * Text for the symbol.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setSymbol(
+ #[TypeAware(['8.0' => 'int'], default: '')] $symbol,
+ #[TypeAware(['8.0' => 'string'], default: '')] $value
+ ): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get a symbol value
+ * @link https://php.net/manual/en/numberformatter.getsymbol.php
+ * @param int $symbol
+ * Symbol specifier, one of the
+ * format symbol constants.
+ *
+ * @return string|false The symbol string or FALSE on error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getSymbol(#[TypeAware(['8.0' => 'int'], default: '')] $symbol): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set formatter pattern
+ * @link https://php.net/manual/en/numberformatter.setpattern.php
+ * @param string $pattern
+ * Pattern in syntax described in
+ * ICU DecimalFormat
+ * documentation.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get formatter pattern
+ * @link https://php.net/manual/en/numberformatter.getpattern.php
+ * @return string|false Pattern string that is used by the formatter, or FALSE if an error happens.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getPattern(): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get formatter locale
+ * @link https://php.net/manual/en/numberformatter.getlocale.php
+ * @param int $type [optional]
+ * You can choose between valid and actual locale (
+ * Locale::VALID_LOCALE,
+ * Locale::ACTUAL_LOCALE,
+ * respectively). The default is the actual locale.
+ *
+ * @return string The locale name used to create the formatter.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLocale(
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get formatter's last error code.
+ * @link https://php.net/manual/en/numberformatter.geterrorcode.php
+ * @return int error code from last formatter call.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get formatter's last error message.
+ * @link https://php.net/manual/en/numberformatter.geterrormessage.php
+ * @return string error message from last formatter call.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string {}
+}
+
+class Normalizer
+{
+ public const NFKC_CF = 48;
+
+ public const FORM_KC_CF = 48;
+
+ /**
+ * Default normalization options
+ * @link https://secure.php.net/manual/en/class.normalizer.php
+ */
+ public const OPTION_DEFAULT = "";
+
+ /**
+ * No decomposition/composition
+ * @link https://secure.php.net/manual/en/class.normalizer.php
+ * @removed 8.0
+ */
+ public const NONE = "1";
+
+ /**
+ * Normalization Form D (NFD) - Canonical Decomposition
+ * @link https://secure.php.net/manual/en/class.normalizer.php
+ */
+ public const FORM_D = 4;
+ public const NFD = 4;
+
+ /**
+ * Normalization Form KD (NFKD) - Compatibility Decomposition
+ * @link https://secure.php.net/manual/en/class.normalizer.php
+ */
+ public const FORM_KD = 8;
+ public const NFKD = 8;
+
+ /**
+ * Normalization Form C (NFC) - Canonical Decomposition followed by
+ * Canonical Composition
+ * @link https://secure.php.net/manual/en/class.normalizer.php
+ */
+ public const FORM_C = 16;
+ public const NFC = 16;
+
+ /**
+ * Normalization Form KC (NFKC) - Compatibility Decomposition, followed by
+ * Canonical Composition
+ * @link https://secure.php.net/manual/en/class.normalizer.php
+ */
+ public const FORM_KC = 32;
+ public const NFKC = 32;
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Normalizes the input provided and returns the normalized string
+ * @link https://php.net/manual/en/normalizer.normalize.php
+ * @param string $string The input string to normalize
+ * @param int $form [optional] One of the normalization forms.
+ * @return string|false The normalized string or FALSE if an error occurred.
+ */
+ #[TentativeType]
+ public static function normalize(
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Checks if the provided string is already in the specified normalization form.
+ * @link https://php.net/manual/en/normalizer.isnormalized.php
+ * @param string $string The input string to normalize
+ * @param int $form [optional]
+ * One of the normalization forms.
+ *
+ * @return bool TRUE if normalized, FALSE otherwise or if there an error
+ */
+ #[TentativeType]
+ public static function isNormalized(
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
+ ): bool {}
+
+ /**
+ * @param string $string The input string to normalize
+ * @param string $form
+ * @return string|null Returns a string containing the Decomposition_Mapping property, if present in the UCD.
+ * Returns null if there is no Decomposition_Mapping property for the character.
+ * @link https://www.php.net/manual/en/normalizer.getrawdecomposition.php
+ * @since 7.3
+ */
+ #[TentativeType]
+ public static function getRawDecomposition(
+ string $string,
+ #[ElementAvailable(from: '8.0')] int $form = 16
+ ): ?string {}
+}
+
+class Locale
+{
+ /**
+ * This is locale the data actually comes from.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const ACTUAL_LOCALE = 0;
+
+ /**
+ * This is the most specific locale supported by ICU.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const VALID_LOCALE = 1;
+
+ /**
+ * Used as locale parameter with the methods of the various locale affected classes,
+ * such as NumberFormatter. This constant would make the methods to use default
+ * locale.
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const DEFAULT_LOCALE = null;
+
+ /**
+ * Language subtag
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const LANG_TAG = "language";
+
+ /**
+ * Extended language subtag
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const EXTLANG_TAG = "extlang";
+
+ /**
+ * Script subtag
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const SCRIPT_TAG = "script";
+
+ /**
+ * Region subtag
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const REGION_TAG = "region";
+
+ /**
+ * Variant subtag
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const VARIANT_TAG = "variant";
+
+ /**
+ * Grandfathered Language subtag
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const GRANDFATHERED_LANG_TAG = "grandfathered";
+
+ /**
+ * Private subtag
+ * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
+ */
+ public const PRIVATE_TAG = "private";
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Gets the default locale value from the INTL global 'default_locale'
+ * @link https://php.net/manual/en/locale.getdefault.php
+ * @return string The current runtime locale
+ */
+ #[TentativeType]
+ public static function getDefault(): string {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * sets the default runtime locale
+ * @link https://php.net/manual/en/locale.setdefault.php
+ * @param string $locale
+ * Is a BCP 47 compliant language tag containing the
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ public static function setDefault(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Gets the primary language for the input locale
+ * @link https://php.net/manual/en/locale.getprimarylanguage.php
+ * @param string $locale
+ * The locale to extract the primary language code from
+ *
+ * @return string|null The language code associated with the language or NULL in case of error.
+ */
+ #[TentativeType]
+ public static function getPrimaryLanguage(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Gets the script for the input locale
+ * @link https://php.net/manual/en/locale.getscript.php
+ * @param string $locale
+ * The locale to extract the script code from
+ *
+ * @return string|null The script subtag for the locale or NULL if not present
+ */
+ #[TentativeType]
+ public static function getScript(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Gets the region for the input locale
+ * @link https://php.net/manual/en/locale.getregion.php
+ * @param string $locale
+ * The locale to extract the region code from
+ *
+ * @return string|null The region subtag for the locale or NULL if not present
+ */
+ #[TentativeType]
+ public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Gets the keywords for the input locale
+ * @link https://php.net/manual/en/locale.getkeywords.php
+ * @param string $locale
+ * The locale to extract the keywords from
+ *
+ * @return array|false|null Associative array containing the keyword-value pairs for this locale
+ */
+ #[TentativeType]
+ public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '')] $locale): array|false|null {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Returns an appropriately localized display name for script of the input locale
+ * @link https://php.net/manual/en/locale.getdisplayscript.php
+ * @param string $locale
+ * The locale to return a display script for
+ *
+ * @param string $displayLocale [optional]
+ * Optional format locale to use to display the script name
+ *
+ * @return string Display name of the script for the $locale in the format appropriate for
+ * $in_locale.
+ */
+ #[TentativeType]
+ public static function getDisplayScript(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Returns an appropriately localized display name for region of the input locale
+ * @link https://php.net/manual/en/locale.getdisplayregion.php
+ * @param string $locale
+ * The locale to return a display region for.
+ *
+ * @param string $displayLocale [optional]
+ * Optional format locale to use to display the region name
+ *
+ * @return string display name of the region for the $locale in the format appropriate for
+ * $in_locale.
+ */
+ #[TentativeType]
+ public static function getDisplayRegion(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Returns an appropriately localized display name for the input locale
+ * @link https://php.net/manual/en/locale.getdisplayname.php
+ * @param string $locale
+ * The locale to return a display name for.
+ *
+ * @param string $displayLocale [optional] optional format locale
+ * @return string|false Display name of the locale in the format appropriate for $in_locale.
+ */
+ #[TentativeType]
+ public static function getDisplayName(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Returns an appropriately localized display name for language of the inputlocale
+ * @link https://php.net/manual/en/locale.getdisplaylanguage.php
+ * @param string $locale
+ * The locale to return a display language for
+ *
+ * @param string $displayLocale [optional]
+ * Optional format locale to use to display the language name
+ *
+ * @return string|false display name of the language for the $locale in the format appropriate for
+ * $in_locale.
+ */
+ #[TentativeType]
+ public static function getDisplayLanguage(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Returns an appropriately localized display name for variants of the input locale
+ * @link https://php.net/manual/en/locale.getdisplayvariant.php
+ * @param string $locale
+ * The locale to return a display variant for
+ *
+ * @param string $displayLocale [optional]
+ * Optional format locale to use to display the variant name
+ *
+ * @return string|false Display name of the variant for the $locale in the format appropriate for
+ * $in_locale.
+ */
+ #[TentativeType]
+ public static function getDisplayVariant(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Returns a correctly ordered and delimited locale ID
+ * @link https://php.net/manual/en/locale.composelocale.php
+ * @param array $subtags
+ * an array containing a list of key-value pairs, where the keys identify
+ * the particular locale ID subtags, and the values are the associated
+ * subtag values.
+ *
+ * The 'variant' and 'private' subtags can take maximum 15 values
+ * whereas 'extlang' can take maximum 3 values.e.g. Variants are allowed
+ * with the suffix ranging from 0-14. Hence the keys for the input array
+ * can be variant0, variant1, ...,variant14. In the returned locale id,
+ * the subtag is ordered by suffix resulting in variant0 followed by
+ * variant1 followed by variant2 and so on.
+ *
+ *
+ * The 'variant', 'private' and 'extlang' multiple values can be specified both
+ * as array under specific key (e.g. 'variant') and as multiple numbered keys
+ * (e.g. 'variant0', 'variant1', etc.).
+ *
+ *
+ * @return string The corresponding locale identifier.
+ */
+ #[TentativeType]
+ public static function composeLocale(array $subtags): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Returns a key-value array of locale ID subtag elements.
+ * @link https://php.net/manual/en/locale.parselocale.php
+ * @param string $locale
+ * The locale to extract the subtag array from. Note: The 'variant' and
+ * 'private' subtags can take maximum 15 values whereas 'extlang' can take
+ * maximum 3 values.
+ *
+ * @return array an array containing a list of key-value pairs, where the keys
+ * identify the particular locale ID subtags, and the values are the
+ * associated subtag values. The array will be ordered as the locale id
+ * subtags e.g. in the locale id if variants are '-varX-varY-varZ' then the
+ * returned array will have variant0=>varX , variant1=>varY ,
+ * variant2=>varZ
+ */
+ #[TentativeType]
+ public static function parseLocale(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?array {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Gets the variants for the input locale
+ * @link https://php.net/manual/en/locale.getallvariants.php
+ * @param string $locale
+ * The locale to extract the variants from
+ *
+ * @return array|null The array containing the list of all variants subtag for the locale
+ * or NULL if not present
+ */
+ #[TentativeType]
+ public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?array {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Checks if a language tag filter matches with locale
+ * @link https://php.net/manual/en/locale.filtermatches.php
+ * @param string $languageTag
+ * The language tag to check
+ *
+ * @param string $locale
+ * The language range to check against
+ *
+ * @param bool $canonicalize [optional]
+ * If true, the arguments will be converted to canonical form before
+ * matching.
+ *
+ * @return bool TRUE if $locale matches $langtag FALSE otherwise.
+ */
+ #[TentativeType]
+ public static function filterMatches(
+ #[TypeAware(['8.0' => 'string'], default: '')] $languageTag,
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false
+ ): ?bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Searches the language tag list for the best match to the language
+ * @link https://php.net/manual/en/locale.lookup.php
+ * @param array $languageTag
+ * An array containing a list of language tags to compare to
+ * locale. Maximum 100 items allowed.
+ *
+ * @param string $locale
+ * The locale to use as the language range when matching.
+ *
+ * @param bool $canonicalize [optional]
+ * If true, the arguments will be converted to canonical form before
+ * matching.
+ *
+ * @param string $defaultLocale [optional]
+ * The locale to use if no match is found.
+ *
+ * @return string The closest matching language tag or default value.
+ */
+ #[TentativeType]
+ public static function lookup(
+ array $languageTag,
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null
+ ): ?string {}
+
+ /**
+ * @link https://php.net/manual/en/locale.canonicalize.php
+ * @param string $locale
+ * @return string
+ */
+ #[TentativeType]
+ public static function canonicalize(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Tries to find out best available locale based on HTTP "Accept-Language" header
+ * @link https://php.net/manual/en/locale.acceptfromhttp.php
+ * @param string $header
+ * The string containing the "Accept-Language" header according to format in RFC 2616.
+ *
+ * @return string The corresponding locale identifier.
+ */
+ #[TentativeType]
+ public static function acceptFromHttp(#[TypeAware(['8.0' => 'string'], default: '')] $header): string|false {}
+}
+
+class MessageFormatter
+{
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Constructs a new Message Formatter
+ * @link https://php.net/manual/en/messageformatter.create.php
+ * @param string $locale
+ * The locale to use when formatting arguments
+ *
+ * @param string $pattern
+ * The pattern string to stick arguments into.
+ * The pattern uses an 'apostrophe-friendly' syntax; it is run through
+ * umsg_autoQuoteApostrophe
+ * before being interpreted.
+ *
+ * @throws IntlException on failure.
+ */
+ #[Pure]
+ public function __construct(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern
+ ) {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Constructs a new Message Formatter
+ * @link https://php.net/manual/en/messageformatter.create.php
+ * @param string $locale
+ * The locale to use when formatting arguments
+ *
+ * @param string $pattern
+ * The pattern string to stick arguments into.
+ * The pattern uses an 'apostrophe-friendly' syntax; it is run through
+ * umsg_autoQuoteApostrophe
+ * before being interpreted.
+ *
+ * @return MessageFormatter|null The formatter object
+ */
+ #[TentativeType]
+ public static function create(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern
+ ): ?MessageFormatter {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Format the message
+ * @link https://php.net/manual/en/messageformatter.format.php
+ * @param array $values
+ * Arguments to insert into the format string
+ *
+ * @return string|false The formatted string, or FALSE if an error occurred
+ */
+ #[Pure]
+ #[TentativeType]
+ public function format(array $values): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Quick format message
+ * @link https://php.net/manual/en/messageformatter.formatmessage.php
+ * @param string $locale
+ * The locale to use for formatting locale-dependent parts
+ *
+ * @param string $pattern
+ * The pattern string to insert things into.
+ * The pattern uses an 'apostrophe-friendly' syntax; it is run through
+ * umsg_autoQuoteApostrophe
+ * before being interpreted.
+ *
+ * @param array $values
+ * The array of values to insert into the format string
+ *
+ * @return string|false The formatted pattern string or FALSE if an error occurred
+ */
+ #[TentativeType]
+ public static function formatMessage(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
+ array $values
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Parse input string according to pattern
+ * @link https://php.net/manual/en/messageformatter.parse.php
+ * @param string $string
+ * The string to parse
+ *
+ * @return array|false An array containing the items extracted, or FALSE on error
+ */
+ #[Pure]
+ #[TentativeType]
+ public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string): array|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Quick parse input string
+ * @link https://php.net/manual/en/messageformatter.parsemessage.php
+ * @param string $locale
+ * The locale to use for parsing locale-dependent parts
+ *
+ * @param string $pattern
+ * The pattern with which to parse the value.
+ *
+ * @param string $message
+ * The string to parse, conforming to the pattern.
+ *
+ * @return array|false An array containing items extracted, or FALSE on error
+ */
+ #[TentativeType]
+ public static function parseMessage(
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
+ #[TypeAware(['8.0' => 'string'], default: '')] $message
+ ): array|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set the pattern used by the formatter
+ * @link https://php.net/manual/en/messageformatter.setpattern.php
+ * @param string $pattern
+ * The pattern string to use in this message formatter.
+ * The pattern uses an 'apostrophe-friendly' syntax; it is run through
+ * umsg_autoQuoteApostrophe
+ * before being interpreted.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the pattern used by the formatter
+ * @link https://php.net/manual/en/messageformatter.getpattern.php
+ * @return string The pattern string for this message formatter
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getPattern(): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the locale for which the formatter was created.
+ * @link https://php.net/manual/en/messageformatter.getlocale.php
+ * @return string The locale name
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLocale(): string {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the error code from last operation
+ * @link https://php.net/manual/en/messageformatter.geterrorcode.php
+ * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the error text from the last operation
+ * @link https://php.net/manual/en/messageformatter.geterrormessage.php
+ * @return string Description of the last error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string {}
}
-class NumberFormatter
-{
- public const CURRENCY_ACCOUNTING = 12;
-
- /**
- * Decimal format defined by pattern
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PATTERN_DECIMAL = 0;
-
- /**
- * Decimal format
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DECIMAL = 1;
-
- /**
- * Currency format
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const CURRENCY = 2;
-
- /**
- * Percent format
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PERCENT = 3;
-
- /**
- * Scientific format
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const SCIENTIFIC = 4;
-
- /**
- * Spellout rule-based format
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const SPELLOUT = 5;
-
- /**
- * Ordinal rule-based format
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ORDINAL = 6;
-
- /**
- * Duration rule-based format
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DURATION = 7;
-
- /**
- * Rule-based format defined by pattern
- * @link https://php.net/manual/en/class.locale.php#intl.locale-constants
- */
- public const PATTERN_RULEBASED = 9;
-
- /**
- * Alias for PATTERN_DECIMAL
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const IGNORE = 0;
-
- /**
- * Default format for the locale
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DEFAULT_STYLE = 1;
-
- /**
- * Rounding mode to round towards positive infinity.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUND_CEILING = 0;
-
- /**
- * Rounding mode to round towards negative infinity.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUND_FLOOR = 1;
-
- /**
- * Rounding mode to round towards zero.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUND_DOWN = 2;
-
- /**
- * Rounding mode to round away from zero.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUND_UP = 3;
-
- /**
- * Rounding mode to round towards the "nearest neighbor" unless both
- * neighbors are equidistant, in which case, round towards the even
- * neighbor.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUND_HALFEVEN = 4;
-
- /**
- * Rounding mode to round towards "nearest neighbor" unless both neighbors
- * are equidistant, in which case round down.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUND_HALFDOWN = 5;
-
- /**
- * Rounding mode to round towards "nearest neighbor" unless both neighbors
- * are equidistant, in which case round up.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUND_HALFUP = 6;
-
- /**
- * Pad characters inserted before the prefix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PAD_BEFORE_PREFIX = 0;
-
- /**
- * Pad characters inserted after the prefix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PAD_AFTER_PREFIX = 1;
-
- /**
- * Pad characters inserted before the suffix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PAD_BEFORE_SUFFIX = 2;
-
- /**
- * Pad characters inserted after the suffix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PAD_AFTER_SUFFIX = 3;
-
- /**
- * Parse integers only.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PARSE_INT_ONLY = 0;
-
- /**
- * Use grouping separator.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const GROUPING_USED = 1;
-
- /**
- * Always show decimal point.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DECIMAL_ALWAYS_SHOWN = 2;
-
- /**
- * Maximum integer digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MAX_INTEGER_DIGITS = 3;
-
- /**
- * Minimum integer digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MIN_INTEGER_DIGITS = 4;
-
- /**
- * Integer digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const INTEGER_DIGITS = 5;
-
- /**
- * Maximum fraction digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MAX_FRACTION_DIGITS = 6;
-
- /**
- * Minimum fraction digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MIN_FRACTION_DIGITS = 7;
-
- /**
- * Fraction digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const FRACTION_DIGITS = 8;
-
- /**
- * Multiplier.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MULTIPLIER = 9;
-
- /**
- * Grouping size.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const GROUPING_SIZE = 10;
-
- /**
- * Rounding Mode.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUNDING_MODE = 11;
-
- /**
- * Rounding increment.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ROUNDING_INCREMENT = 12;
-
- /**
- * The width to which the output of format() is padded.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const FORMAT_WIDTH = 13;
-
- /**
- * The position at which padding will take place. See pad position
- * constants for possible argument values.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PADDING_POSITION = 14;
-
- /**
- * Secondary grouping size.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const SECONDARY_GROUPING_SIZE = 15;
-
- /**
- * Use significant digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const SIGNIFICANT_DIGITS_USED = 16;
-
- /**
- * Minimum significant digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MIN_SIGNIFICANT_DIGITS = 17;
-
- /**
- * Maximum significant digits.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MAX_SIGNIFICANT_DIGITS = 18;
-
- /**
- * Lenient parse mode used by rule-based formats.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const LENIENT_PARSE = 19;
-
- /**
- * Positive prefix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const POSITIVE_PREFIX = 0;
-
- /**
- * Positive suffix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const POSITIVE_SUFFIX = 1;
-
- /**
- * Negative prefix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const NEGATIVE_PREFIX = 2;
-
- /**
- * Negative suffix.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const NEGATIVE_SUFFIX = 3;
-
- /**
- * The character used to pad to the format width.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PADDING_CHARACTER = 4;
-
- /**
- * The ISO currency code.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const CURRENCY_CODE = 5;
-
- /**
- * The default rule set. This is only available with rule-based
- * formatters.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DEFAULT_RULESET = 6;
-
- /**
- * The public rule sets. This is only available with rule-based
- * formatters. This is a read-only attribute. The public rulesets are
- * returned as a single string, with each ruleset name delimited by ';'
- * (semicolon).
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PUBLIC_RULESETS = 7;
-
- /**
- * The decimal separator.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DECIMAL_SEPARATOR_SYMBOL = 0;
-
- /**
- * The grouping separator.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const GROUPING_SEPARATOR_SYMBOL = 1;
-
- /**
- * The pattern separator.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PATTERN_SEPARATOR_SYMBOL = 2;
-
- /**
- * The percent sign.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PERCENT_SYMBOL = 3;
-
- /**
- * Zero.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ZERO_DIGIT_SYMBOL = 4;
-
- /**
- * Character representing a digit in the pattern.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DIGIT_SYMBOL = 5;
-
- /**
- * The minus sign.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MINUS_SIGN_SYMBOL = 6;
-
- /**
- * The plus sign.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PLUS_SIGN_SYMBOL = 7;
-
- /**
- * The currency symbol.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const CURRENCY_SYMBOL = 8;
-
- /**
- * The international currency symbol.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const INTL_CURRENCY_SYMBOL = 9;
-
- /**
- * The monetary separator.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MONETARY_SEPARATOR_SYMBOL = 10;
-
- /**
- * The exponential symbol.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const EXPONENTIAL_SYMBOL = 11;
-
- /**
- * Per mill symbol.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PERMILL_SYMBOL = 12;
-
- /**
- * Escape padding character.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PAD_ESCAPE_SYMBOL = 13;
-
- /**
- * Infinity symbol.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const INFINITY_SYMBOL = 14;
-
- /**
- * Not-a-number symbol.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const NAN_SYMBOL = 15;
-
- /**
- * Significant digit symbol.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const SIGNIFICANT_DIGIT_SYMBOL = 16;
-
- /**
- * The monetary grouping separator.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17;
-
- /**
- * Derive the type from variable type
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const TYPE_DEFAULT = 0;
-
- /**
- * Format/parse as 32-bit integer
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const TYPE_INT32 = 1;
-
- /**
- * Format/parse as 64-bit integer
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const TYPE_INT64 = 2;
-
- /**
- * Format/parse as floating point value
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const TYPE_DOUBLE = 3;
-
- /**
- * Format/parse as currency value
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const TYPE_CURRENCY = 4;
-
- /**
- * @link https://www.php.net/manual/en/class.numberformatter.php
- * @param string $locale
- * @param int $style
- * @param string $pattern [optional]
- */
- #[Pure]
- public function __construct(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'int'], default: '')] $style,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Create a number formatter
- * @link https://php.net/manual/en/numberformatter.create.php
- * @param string $locale
- * Locale in which the number would be formatted (locale name, e.g. en_CA).
- *
- * @param int $style
- * Style of the formatting, one of the
- * format style constants. If
- * NumberFormatter::PATTERN_DECIMAL
- * or NumberFormatter::PATTERN_RULEBASED
- * is passed then the number format is opened using the given pattern,
- * which must conform to the syntax described in
- * ICU DecimalFormat
- * documentation or
- * ICU RuleBasedNumberFormat
- * documentation, respectively.
- *
- * @param string $pattern [optional]
- * Pattern string if the chosen style requires a pattern.
- *
- * @return NumberFormatter|false NumberFormatter object or FALSE on error.
- */
- public static function create(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED])] $style,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Format a number
- * @link https://php.net/manual/en/numberformatter.format.php
- * @param int|float $num
- * The value to format. Can be integer or float,
- * other values will be converted to a numeric value.
- *
- * @param int $type [optional]
- * The
- * formatting type to use.
- *
- * @return string|false the string containing formatted value, or FALSE on error.
- */
- #[Pure]
- public function format(
- #[TypeAware(['8.0' => 'int|float'], default: '')] $num,
- #[TypeAware(['8.0' => 'int'], default: '')] $type = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Parse a number
- * @link https://php.net/manual/en/numberformatter.parse.php
- * @param string $string
- * @param int $type [optional]
- * The
- * formatting type to use. By default,
- * NumberFormatter::TYPE_DOUBLE is used.
- *
- * @param int &$offset [optional]
- * Offset in the string at which to begin parsing. On return, this value
- * will hold the offset at which parsing ended.
- *
- * @return mixed The value of the parsed number or FALSE on error.
- */
- public function parse(
- #[TypeAware(['8.0' => 'string'], default: '')] $string,
- #[TypeAware(['8.0' => 'int'], default: '')] $type = NumberFormatter::TYPE_DOUBLE,
- &$offset = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Format a currency value
- * @link https://php.net/manual/en/numberformatter.formatcurrency.php
- * @param float $amount
- * The numeric currency value.
- *
- * @param string $currency
- * The 3-letter ISO 4217 currency code indicating the currency to use.
- *
- * @return string String representing the formatted currency value.
- */
- #[Pure]
- public function formatCurrency(
- #[TypeAware(['8.0' => 'float'], default: '')] $amount,
- #[TypeAware(['8.0' => 'string'], default: '')] $currency
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Parse a currency number
- * @link https://php.net/manual/en/numberformatter.parsecurrency.php
- * @param string $string
- * @param string &$currency
- * Parameter to receive the currency name (3-letter ISO 4217 currency
- * code).
- *
- * @param int &$offset [optional]
- * Offset in the string at which to begin parsing. On return, this value
- * will hold the offset at which parsing ended.
- *
- * @return float|false The parsed numeric value or FALSE on error.
- */
- public function parseCurrency(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$currency, &$offset = null) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set an attribute
- * @link https://php.net/manual/en/numberformatter.setattribute.php
- * @param int $attribute
- * Attribute specifier - one of the
- * numeric attribute constants.
- *
- * @param int $value
- * The attribute value.
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setAttribute(
- #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
- #[TypeAware(['8.0' => 'int|float'], default: '')] $value
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get an attribute
- * @link https://php.net/manual/en/numberformatter.getattribute.php
- * @param int $attribute
- * Attribute specifier - one of the
- * numeric attribute constants.
- *
- * @return int|false Return attribute value on success, or FALSE on error.
- */
- #[Pure]
- public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set a text attribute
- * @link https://php.net/manual/en/numberformatter.settextattribute.php
- * @param int $attribute
- * Attribute specifier - one of the
- * text attribute
- * constants.
- *
- * @param string $value
- * Text for the attribute value.
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setTextAttribute(
- #[TypeAware(['8.0' => 'int'], default: '')] $attribute,
- #[TypeAware(['8.0' => 'string'], default: '')] $value
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get a text attribute
- * @link https://php.net/manual/en/numberformatter.gettextattribute.php
- * @param int $attribute
- * Attribute specifier - one of the
- * text attribute constants.
- *
- * @return string|false Return attribute value on success, or FALSE on error.
- */
- #[Pure]
- public function getTextAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set a symbol value
- * @link https://php.net/manual/en/numberformatter.setsymbol.php
- * @param int $symbol
- * Symbol specifier, one of the
- * format symbol constants.
- *
- * @param string $value
- * Text for the symbol.
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setSymbol(
- #[TypeAware(['8.0' => 'int'], default: '')] $symbol,
- #[TypeAware(['8.0' => 'string'], default: '')] $value
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get a symbol value
- * @link https://php.net/manual/en/numberformatter.getsymbol.php
- * @param int $symbol
- * Symbol specifier, one of the
- * format symbol constants.
- *
- * @return string|false The symbol string or FALSE on error.
- */
- #[Pure]
- public function getSymbol(#[TypeAware(['8.0' => 'int'], default: '')] $symbol) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set formatter pattern
- * @link https://php.net/manual/en/numberformatter.setpattern.php
- * @param string $pattern
- * Pattern in syntax described in
- * ICU DecimalFormat
- * documentation.
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get formatter pattern
- * @link https://php.net/manual/en/numberformatter.getpattern.php
- * @return string|false Pattern string that is used by the formatter, or FALSE if an error happens.
- */
- #[Pure]
- public function getPattern() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get formatter locale
- * @link https://php.net/manual/en/numberformatter.getlocale.php
- * @param int $type [optional]
- * You can choose between valid and actual locale (
- * Locale::VALID_LOCALE,
- * Locale::ACTUAL_LOCALE,
- * respectively). The default is the actual locale.
- *
- * @return string The locale name used to create the formatter.
- */
- #[Pure]
- public function getLocale(
- #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get formatter's last error code.
- * @link https://php.net/manual/en/numberformatter.geterrorcode.php
- * @return int error code from last formatter call.
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get formatter's last error message.
- * @link https://php.net/manual/en/numberformatter.geterrormessage.php
- * @return string error message from last formatter call.
- */
- #[Pure]
- public function getErrorMessage() {}
-}
+class IntlDateFormatter
+{
+ /**
+ * Completely specified style (Tuesday, April 12, 1952 AD or 3:30:42pm PST)
+ * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
+ */
+ public const FULL = 0;
+
+ /**
+ * Long style (January 12, 1952 or 3:30:32pm)
+ * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
+ */
+ public const LONG = 1;
+
+ /**
+ * Medium style (Jan 12, 1952)
+ * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
+ */
+ public const MEDIUM = 2;
+
+ /**
+ * Most abbreviated style, only essential data (12/13/52 or 3:30pm)
+ * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
+ */
+ public const SHORT = 3;
+
+ /**
+ * Do not include this element
+ * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
+ */
+ public const NONE = -1;
+
+ /**
+ * Gregorian Calendar
+ * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
+ */
+ public const GREGORIAN = 1;
+
+ /**
+ * Non-Gregorian Calendar
+ * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
+ */
+ public const TRADITIONAL = 0;
+
+ public const RELATIVE_FULL = 128;
+ public const RELATIVE_LONG = 129;
+ public const RELATIVE_MEDIUM = 130;
+ public const RELATIVE_SHORT = 131;
+
+ /**
+ * @param string|null $locale
+ * @param int $dateType [optional]
+ * @param int $timeType [optional]
+ * @param mixed|null $timezone [optional]
+ * @param mixed|null $calendar [optional]
+ * @param string $pattern [optional]
+ */
+ #[Pure]
+ public function __construct(
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
+ #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
+ $timezone = null,
+ $calendar = null,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
+ ) {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Create a date formatter
+ * @link https://php.net/manual/en/intldateformatter.create.php
+ * @param string $locale
+ * Locale to use when formatting or parsing; default is specified in the ini setting intl.default_locale.
+ *
+ * @param int $dateType [optional]
+ * Date type to use (none,
+ * short, medium,
+ * long, full).
+ * This is one of the
+ * IntlDateFormatter constants.
+ *
+ * @param int $timeType [optional]
+ * Time type to use (none,
+ * short, medium,
+ * long, full).
+ * This is one of the
+ * IntlDateFormatter constants.
+ *
+ * @param string $timezone [optional]
+ * Time zone ID, default is system default.
+ *
+ * @param int $calendar [optional]
+ * Calendar to use for formatting or parsing; default is Gregorian.
+ * This is one of the
+ * IntlDateFormatter calendar constants.
+ *
+ * @param string $pattern [optional]
+ * Optional pattern to use when formatting or parsing.
+ * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
+ *
+ * @return IntlDateFormatter
+ */
+ #[TentativeType]
+ public static function create(
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
+ #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
+ $timezone = null,
+ #[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
+ ): ?IntlDateFormatter {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the datetype used for the IntlDateFormatter
+ * @link https://php.net/manual/en/intldateformatter.getdatetype.php
+ * @return int|false The current date type value of the formatter.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDateType(): int|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the timetype used for the IntlDateFormatter
+ * @link https://php.net/manual/en/intldateformatter.gettimetype.php
+ * @return int|false The current date type value of the formatter.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getTimeType(): int|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the calendar used for the IntlDateFormatter
+ * @link https://php.net/manual/en/intldateformatter.getcalendar.php
+ * @return int|false The calendar being used by the formatter.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getCalendar(): int|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * sets the calendar used to the appropriate calendar, which must be
+ * @link https://php.net/manual/en/intldateformatter.setcalendar.php
+ * @param int $calendar
+ * The calendar to use.
+ * Default is IntlDateFormatter::GREGORIAN.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setCalendar(#[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the timezone-id used for the IntlDateFormatter
+ * @link https://php.net/manual/en/intldateformatter.gettimezoneid.php
+ * @return string|false ID string for the time zone used by this formatter.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getTimeZoneId(): string|false {}
+
+ /**
+ * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
+ * Get copy of formatter's calendar object
+ * @link https://secure.php.net/manual/en/intldateformatter.getcalendarobject.php
+ * @return IntlCalendar|false|null A copy of the internal calendar object used by this formatter.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getCalendarObject(): IntlCalendar|false|null {}
+
+ /**
+ * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
+ * Get formatter's timezone
+ * @link https://secure.php.net/manual/en/intldateformatter.gettimezone.php
+ * @return IntlTimeZone|false The associated IntlTimeZone object or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getTimeZone(): IntlTimeZone|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Sets the time zone to use
+ * @link https://php.net/manual/en/intldateformatter.settimezoneid.php
+ * @param string $zone
+ * The time zone ID string of the time zone to use.
+ * If NULL or the empty string, the default time zone for the runtime is used.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ * @removed 7.0
+ * @see IntlDateFormatter::setTimeZone()
+ */
+ #[Deprecated(replacement: "%class%->setTimeZone(%parametersList%)", since: "5.5")]
+ public function setTimeZoneId($zone) {}
+
+ /**
+ * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
+ * Sets formatter's timezone
+ * @link https://php.net/manual/en/intldateformatter.settimezone.php
+ * @param mixed $timezone
+ * The timezone to use for this formatter. This can be specified in the
+ * following forms:
+ *
+ * -
+ *
+ * NULL, in which case the default timezone will be used, as specified in
+ * the ini setting {@link "https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or
+ * through the function {@link "https://secure.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as
+ * returned by {@link "https://secure.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}.
+ *
+ *
+ * -
+ *
+ * An {@link "https://secure.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly.
+ *
+ *
+ * -
+ *
+ * A {@link "https://secure.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted
+ * and an ICU timezone object will be created; the timezone will be backed
+ * by ICU's database, not PHP's.
+ *
+ *
+ * -
+ *
+ * A {@link "https://secure.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier.
+ * See IntlTimeZone::createTimeZoneIDEnumeration(). Raw offsets such as "GMT+08:30" are also accepted.
+ *
+ *
+ *
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setTimeZone($timezone): ?bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set the pattern used for the IntlDateFormatter
+ * @link https://php.net/manual/en/intldateformatter.setpattern.php
+ * @param string $pattern
+ * New pattern string to use.
+ * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ * Bad formatstrings are usually the cause of the failure.
+ */
+ #[TentativeType]
+ public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the pattern used for the IntlDateFormatter
+ * @link https://php.net/manual/en/intldateformatter.getpattern.php
+ * @return string The pattern string being used to format/parse.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getPattern(): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the locale used by formatter
+ * @link https://php.net/manual/en/intldateformatter.getlocale.php
+ * @param int $type [optional]
+ * @return string|false the locale of this formatter or 'false' if error
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLocale(
+ #[ElementAvailable(from: '8.0')]
+ #[TypeAware(['8.0' => 'int'], default: '')]
+ $type = null
+ ): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Set the leniency of the parser
+ * @link https://php.net/manual/en/intldateformatter.setlenient.php
+ * @param bool $lenient
+ * Sets whether the parser is lenient or not, default is TRUE (lenient).
+ *
+ * @return bool TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient): void {}
-class Normalizer
-{
- public const NFKC_CF = 48;
-
- public const FORM_KC_CF = 48;
-
- /**
- * Default normalization options
- * @link https://secure.php.net/manual/en/class.normalizer.php
- */
- public const OPTION_DEFAULT = "";
-
- /**
- * No decomposition/composition
- * @link https://secure.php.net/manual/en/class.normalizer.php
- * @removed 8.0
- */
- public const NONE = "1";
-
- /**
- * Normalization Form D (NFD) - Canonical Decomposition
- * @link https://secure.php.net/manual/en/class.normalizer.php
- */
- public const FORM_D = 4;
- public const NFD = 4;
-
- /**
- * Normalization Form KD (NFKD) - Compatibility Decomposition
- * @link https://secure.php.net/manual/en/class.normalizer.php
- */
- public const FORM_KD = 8;
- public const NFKD = 8;
-
- /**
- * Normalization Form C (NFC) - Canonical Decomposition followed by
- * Canonical Composition
- * @link https://secure.php.net/manual/en/class.normalizer.php
- */
- public const FORM_C = 16;
- public const NFC = 16;
-
- /**
- * Normalization Form KC (NFKC) - Compatibility Decomposition, followed by
- * Canonical Composition
- * @link https://secure.php.net/manual/en/class.normalizer.php
- */
- public const FORM_KC = 32;
- public const NFKC = 32;
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Normalizes the input provided and returns the normalized string
- * @link https://php.net/manual/en/normalizer.normalize.php
- * @param string $string The input string to normalize
- * @param int $form [optional] One of the normalization forms.
- * @return string|false The normalized string or FALSE if an error occurred.
- */
- public static function normalize(
- #[TypeAware(['8.0' => 'string'], default: '')] $string,
- #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Checks if the provided string is already in the specified normalization form.
- * @link https://php.net/manual/en/normalizer.isnormalized.php
- * @param string $string The input string to normalize
- * @param int $form [optional]
- * One of the normalization forms.
- *
- * @return bool TRUE if normalized, FALSE otherwise or if there an error
- */
- public static function isNormalized(
- #[TypeAware(['8.0' => 'string'], default: '')] $string,
- #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C
- ) {}
-
- /**
- * @param string $string The input string to normalize
- * @param string $form
- * @return string|null Returns a string containing the Decomposition_Mapping property, if present in the UCD.
- * Returns null if there is no Decomposition_Mapping property for the character.
- * @link https://www.php.net/manual/en/normalizer.getrawdecomposition.php
- * @since 7.3
- */
- public static function getRawDecomposition(
- string $string,
- #[ElementAvailable(from: '8.0')] int $form = 16
- ) {}
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the lenient used for the IntlDateFormatter
+ * @link https://php.net/manual/en/intldateformatter.islenient.php
+ * @return bool TRUE if parser is lenient, FALSE if parser is strict. By default the parser is lenient.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isLenient(): bool {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Format the date/time value as a string
+ * @link https://php.net/manual/en/intldateformatter.format.php
+ * @param mixed $datetime
+ * Value to format. This may be a DateTime object,
+ * an integer representing a Unix timestamp value (seconds
+ * since epoch, UTC) or an array in the format output by
+ * localtime.
+ *
+ * @return string|false The formatted string or, if an error occurred, FALSE.
+ */
+ #[TentativeType]
+ public function format($datetime = null, #[ElementAvailable(from: '5.3', to: '7.4')] $array = null): string|false {}
+
+ /**
+ * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
+ * Formats an object
+ * @link https://secure.php.net/manual/en/intldateformatter.formatobject.php
+ * @param object $datetime
+ * An object of type {@link "https://secure.php.net/manual/en/class.intlcalendar.php" IntlCalendar} or {@link "https://secure.php.net/manual/en/class.datetime.php" DateTime}. The timezone information in the object will be used.
+ *
+ * @param mixed $format [optional]
+ * How to format the date/time. This can either be an {@link "https://secure.php.net/manual/en/language.types.array.php" array} with
+ * two elements (first the date style, then the time style, these being one
+ * of the constants IntlDateFormatter::NONE,
+ * IntlDateFormatter::SHORT,
+ * IntlDateFormatter::MEDIUM,
+ * IntlDateFormatter::LONG,
+ * IntlDateFormatter::FULL), a long with
+ * the value of one of these constants (in which case it will be used both
+ * for the time and the date) or a {@link "https://secure.php.net/manual/en/language.types.string.php" string} with the format
+ * described in {@link "http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details" the ICU documentation}.
+ * If NULL, the default style will be used.
+ *
+ * @param string|null $locale [optional]
+ * The locale to use, or NULL to use the {@link "https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale" default one}.
+ * @return string|false A string with result or FALSE on failure.
+ */
+ #[TentativeType]
+ public static function formatObject($datetime, $format = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): string|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Parse string to a timestamp value
+ * @link https://php.net/manual/en/intldateformatter.parse.php
+ * @param string $string
+ * string to convert to a time
+ *
+ * @param int &$offset [optional]
+ * Position at which to start the parsing in $value (zero-based).
+ * If no error occurs before $value is consumed, $parse_pos will contain -1
+ * otherwise it will contain the position at which parsing ended (and the error occurred).
+ * This variable will contain the end position if the parse fails.
+ * If $parse_pos > strlen($value), the parse fails immediately.
+ *
+ * @return int|float|false timestamp parsed value
+ */
+ #[TentativeType]
+ public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null): int|float|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Parse string to a field-based time value
+ * @link https://php.net/manual/en/intldateformatter.localtime.php
+ * @param string $string
+ * string to convert to a time
+ *
+ * @param int &$offset [optional]
+ * Position at which to start the parsing in $value (zero-based).
+ * If no error occurs before $value is consumed, $parse_pos will contain -1
+ * otherwise it will contain the position at which parsing ended .
+ * If $parse_pos > strlen($value), the parse fails immediately.
+ *
+ * @return array|false Localtime compatible array of integers : contains 24 hour clock value in tm_hour field
+ */
+ #[TentativeType]
+ public function localtime(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null): array|false {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the error code from last operation
+ * @link https://php.net/manual/en/intldateformatter.geterrorcode.php
+ * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int {}
+
+ /**
+ * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
+ * Get the error text from the last operation.
+ * @link https://php.net/manual/en/intldateformatter.geterrormessage.php
+ * @return string Description of the last error.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string {}
}
-class Locale
+class ResourceBundle implements IteratorAggregate, Countable
{
- /**
- * This is locale the data actually comes from.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const ACTUAL_LOCALE = 0;
-
- /**
- * This is the most specific locale supported by ICU.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const VALID_LOCALE = 1;
-
- /**
- * Used as locale parameter with the methods of the various locale affected classes,
- * such as NumberFormatter. This constant would make the methods to use default
- * locale.
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const DEFAULT_LOCALE = null;
-
- /**
- * Language subtag
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const LANG_TAG = "language";
-
- /**
- * Extended language subtag
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const EXTLANG_TAG = "extlang";
-
- /**
- * Script subtag
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const SCRIPT_TAG = "script";
-
- /**
- * Region subtag
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const REGION_TAG = "region";
-
- /**
- * Variant subtag
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const VARIANT_TAG = "variant";
-
- /**
- * Grandfathered Language subtag
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const GRANDFATHERED_LANG_TAG = "grandfathered";
-
- /**
- * Private subtag
- * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants
- */
- public const PRIVATE_TAG = "private";
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Gets the default locale value from the INTL global 'default_locale'
- * @link https://php.net/manual/en/locale.getdefault.php
- * @return string The current runtime locale
- */
- public static function getDefault() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * sets the default runtime locale
- * @link https://php.net/manual/en/locale.setdefault.php
- * @param string $locale
- * Is a BCP 47 compliant language tag containing the
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public static function setDefault(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Gets the primary language for the input locale
- * @link https://php.net/manual/en/locale.getprimarylanguage.php
- * @param string $locale
- * The locale to extract the primary language code from
- *
- * @return string|null The language code associated with the language or NULL in case of error.
- */
- public static function getPrimaryLanguage(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Gets the script for the input locale
- * @link https://php.net/manual/en/locale.getscript.php
- * @param string $locale
- * The locale to extract the script code from
- *
- * @return string|null The script subtag for the locale or NULL if not present
- */
- public static function getScript(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Gets the region for the input locale
- * @link https://php.net/manual/en/locale.getregion.php
- * @param string $locale
- * The locale to extract the region code from
- *
- * @return string|null The region subtag for the locale or NULL if not present
- */
- public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Gets the keywords for the input locale
- * @link https://php.net/manual/en/locale.getkeywords.php
- * @param string $locale
- * The locale to extract the keywords from
- *
- * @return array Associative array containing the keyword-value pairs for this locale
- */
- public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Returns an appropriately localized display name for script of the input locale
- * @link https://php.net/manual/en/locale.getdisplayscript.php
- * @param string $locale
- * The locale to return a display script for
- *
- * @param string $displayLocale [optional]
- * Optional format locale to use to display the script name
- *
- * @return string Display name of the script for the $locale in the format appropriate for
- * $in_locale.
- */
- public static function getDisplayScript(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Returns an appropriately localized display name for region of the input locale
- * @link https://php.net/manual/en/locale.getdisplayregion.php
- * @param string $locale
- * The locale to return a display region for.
- *
- * @param string $displayLocale [optional]
- * Optional format locale to use to display the region name
- *
- * @return string display name of the region for the $locale in the format appropriate for
- * $in_locale.
- */
- public static function getDisplayRegion(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Returns an appropriately localized display name for the input locale
- * @link https://php.net/manual/en/locale.getdisplayname.php
- * @param string $locale
- * The locale to return a display name for.
- *
- * @param string $displayLocale [optional] optional format locale
- * @return string Display name of the locale in the format appropriate for $in_locale.
- */
- public static function getDisplayName(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Returns an appropriately localized display name for language of the inputlocale
- * @link https://php.net/manual/en/locale.getdisplaylanguage.php
- * @param string $locale
- * The locale to return a display language for
- *
- * @param string $displayLocale [optional]
- * Optional format locale to use to display the language name
- *
- * @return string display name of the language for the $locale in the format appropriate for
- * $in_locale.
- */
- public static function getDisplayLanguage(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Returns an appropriately localized display name for variants of the input locale
- * @link https://php.net/manual/en/locale.getdisplayvariant.php
- * @param string $locale
- * The locale to return a display variant for
- *
- * @param string $displayLocale [optional]
- * Optional format locale to use to display the variant name
- *
- * @return string Display name of the variant for the $locale in the format appropriate for
- * $in_locale.
- */
- public static function getDisplayVariant(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Returns a correctly ordered and delimited locale ID
- * @link https://php.net/manual/en/locale.composelocale.php
- * @param array $subtags
- * an array containing a list of key-value pairs, where the keys identify
- * the particular locale ID subtags, and the values are the associated
- * subtag values.
- *
- * The 'variant' and 'private' subtags can take maximum 15 values
- * whereas 'extlang' can take maximum 3 values.e.g. Variants are allowed
- * with the suffix ranging from 0-14. Hence the keys for the input array
- * can be variant0, variant1, ...,variant14. In the returned locale id,
- * the subtag is ordered by suffix resulting in variant0 followed by
- * variant1 followed by variant2 and so on.
- *
- *
- * The 'variant', 'private' and 'extlang' multiple values can be specified both
- * as array under specific key (e.g. 'variant') and as multiple numbered keys
- * (e.g. 'variant0', 'variant1', etc.).
- *
- *
- * @return string The corresponding locale identifier.
- */
- public static function composeLocale(array $subtags) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Returns a key-value array of locale ID subtag elements.
- * @link https://php.net/manual/en/locale.parselocale.php
- * @param string $locale
- * The locale to extract the subtag array from. Note: The 'variant' and
- * 'private' subtags can take maximum 15 values whereas 'extlang' can take
- * maximum 3 values.
- *
- * @return array an array containing a list of key-value pairs, where the keys
- * identify the particular locale ID subtags, and the values are the
- * associated subtag values. The array will be ordered as the locale id
- * subtags e.g. in the locale id if variants are '-varX-varY-varZ' then the
- * returned array will have variant0=>varX , variant1=>varY ,
- * variant2=>varZ
- */
- public static function parseLocale(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Gets the variants for the input locale
- * @link https://php.net/manual/en/locale.getallvariants.php
- * @param string $locale
- * The locale to extract the variants from
- *
- * @return array|null The array containing the list of all variants subtag for the locale
- * or NULL if not present
- */
- public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Checks if a language tag filter matches with locale
- * @link https://php.net/manual/en/locale.filtermatches.php
- * @param string $languageTag
- * The language tag to check
- *
- * @param string $locale
- * The language range to check against
- *
- * @param bool $canonicalize [optional]
- * If true, the arguments will be converted to canonical form before
- * matching.
- *
- * @return bool TRUE if $locale matches $langtag FALSE otherwise.
- */
- public static function filterMatches(
- #[TypeAware(['8.0' => 'string'], default: '')] $languageTag,
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Searches the language tag list for the best match to the language
- * @link https://php.net/manual/en/locale.lookup.php
- * @param array $languageTag
- * An array containing a list of language tags to compare to
- * locale. Maximum 100 items allowed.
- *
- * @param string $locale
- * The locale to use as the language range when matching.
- *
- * @param bool $canonicalize [optional]
- * If true, the arguments will be converted to canonical form before
- * matching.
- *
- * @param string $defaultLocale [optional]
- * The locale to use if no match is found.
- *
- * @return string The closest matching language tag or default value.
- */
- public static function lookup(
- array $languageTag,
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null
- ) {}
-
- /**
- * @link https://php.net/manual/en/locale.canonicalize.php
- * @param string $locale
- * @return string
- */
- public static function canonicalize(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Tries to find out best available locale based on HTTP "Accept-Language" header
- * @link https://php.net/manual/en/locale.acceptfromhttp.php
- * @param string $header
- * The string containing the "Accept-Language" header according to format in RFC 2616.
- *
- * @return string The corresponding locale identifier.
- */
- public static function acceptFromHttp(#[TypeAware(['8.0' => 'string'], default: '')] $header) {}
+ /**
+ * @link https://www.php.net/manual/en/resourcebundle.create.php
+ * @param string $locale Locale for which the resources should be loaded (locale name, e.g. en_CA).
+ * @param string $bundle The directory where the data is stored or the name of the .dat file.
+ * @param bool $fallback [optional] Whether locale should match exactly or fallback to parent locale is allowed.
+ */
+ #[Pure]
+ public function __construct(
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
+ ) {}
+
+ /**
+ * (PHP >= 5.3.2, PECL intl >= 2.0.0)
+ * Create a resource bundle
+ * @link https://php.net/manual/en/resourcebundle.create.php
+ * @param string $locale
+ * Locale for which the resources should be loaded (locale name, e.g. en_CA).
+ *
+ * @param string $bundle
+ * The directory where the data is stored or the name of the .dat file.
+ *
+ * @param bool $fallback [optional]
+ * Whether locale should match exactly or fallback to parent locale is allowed.
+ *
+ * @return ResourceBundle|null ResourceBundle object or null on error.
+ */
+ #[TentativeType]
+ public static function create(
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
+ ): ?ResourceBundle {}
+
+ /**
+ * (PHP >= 5.3.2, PECL intl >= 2.0.0)
+ * Get data from the bundle
+ * @link https://php.net/manual/en/resourcebundle.get.php
+ * @param string|int $index
+ * Data index, must be string or integer.
+ *
+ * @param bool $fallback
+ * @return mixed the data located at the index or NULL on error. Strings, integers and binary data strings
+ * are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are
+ * returned as ResourceBundle object.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function get($index, #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true): mixed {}
+
+ /**
+ * (PHP >= 5.3.2, PECL intl >= 2.0.0)
+ * Get number of elements in the bundle
+ * @link https://php.net/manual/en/resourcebundle.count.php
+ * @return int number of elements in the bundle.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function count(): int {}
+
+ /**
+ * (PHP >= 5.3.2, PECL intl >= 2.0.0)
+ * Get supported locales
+ * @link https://php.net/manual/en/resourcebundle.locales.php
+ * @param string $bundle
+ * Path of ResourceBundle for which to get available locales, or
+ * empty string for default locales list.
+ *
+ * @return array the list of locales supported by the bundle.
+ */
+ #[TentativeType]
+ public static function getLocales(#[TypeAware(['8.0' => 'string'], default: '')] $bundle): array|false {}
+
+ /**
+ * (PHP >= 5.3.2, PECL intl >= 2.0.0)
+ * Get bundle's last error code.
+ * @link https://php.net/manual/en/resourcebundle.geterrorcode.php
+ * @return int error code from last bundle object call.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int {}
+
+ /**
+ * (PHP >= 5.3.2, PECL intl >= 2.0.0)
+ * Get bundle's last error message.
+ * @link https://php.net/manual/en/resourcebundle.geterrormessage.php
+ * @return string error message from last bundle object's call.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string {}
+
+ /**
+ * @return Traversable
+ * @since 8.0
+ */
+ #[Pure]
+ public function getIterator(): Iterator {}
}
-class MessageFormatter
+/**
+ * @since 5.4
+ */
+class Transliterator
{
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Constructs a new Message Formatter
- * @link https://php.net/manual/en/messageformatter.create.php
- * @param string $locale
- * The locale to use when formatting arguments
- *
- * @param string $pattern
- * The pattern string to stick arguments into.
- * The pattern uses an 'apostrophe-friendly' syntax; it is run through
- * umsg_autoQuoteApostrophe
- * before being interpreted.
- *
- * @throws IntlException on failure.
- */
- #[Pure]
- public function __construct(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string'], default: '')] $pattern
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Constructs a new Message Formatter
- * @link https://php.net/manual/en/messageformatter.create.php
- * @param string $locale
- * The locale to use when formatting arguments
- *
- * @param string $pattern
- * The pattern string to stick arguments into.
- * The pattern uses an 'apostrophe-friendly' syntax; it is run through
- * umsg_autoQuoteApostrophe
- * before being interpreted.
- *
- * @return MessageFormatter The formatter object
- */
- public static function create(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string'], default: '')] $pattern
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Format the message
- * @link https://php.net/manual/en/messageformatter.format.php
- * @param array $values
- * Arguments to insert into the format string
- *
- * @return string|false The formatted string, or FALSE if an error occurred
- */
- #[Pure]
- public function format(array $values) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Quick format message
- * @link https://php.net/manual/en/messageformatter.formatmessage.php
- * @param string $locale
- * The locale to use for formatting locale-dependent parts
- *
- * @param string $pattern
- * The pattern string to insert things into.
- * The pattern uses an 'apostrophe-friendly' syntax; it is run through
- * umsg_autoQuoteApostrophe
- * before being interpreted.
- *
- * @param array $values
- * The array of values to insert into the format string
- *
- * @return string|false The formatted pattern string or FALSE if an error occurred
- */
- public static function formatMessage(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
- array $values
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Parse input string according to pattern
- * @link https://php.net/manual/en/messageformatter.parse.php
- * @param string $string
- * The string to parse
- *
- * @return array|false An array containing the items extracted, or FALSE on error
- */
- #[Pure]
- public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Quick parse input string
- * @link https://php.net/manual/en/messageformatter.parsemessage.php
- * @param string $locale
- * The locale to use for parsing locale-dependent parts
- *
- * @param string $pattern
- * The pattern with which to parse the value.
- *
- * @param string $message
- * The string to parse, conforming to the pattern.
- *
- * @return array|false An array containing items extracted, or FALSE on error
- */
- public static function parseMessage(
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string'], default: '')] $pattern,
- #[TypeAware(['8.0' => 'string'], default: '')] $message
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set the pattern used by the formatter
- * @link https://php.net/manual/en/messageformatter.setpattern.php
- * @param string $pattern
- * The pattern string to use in this message formatter.
- * The pattern uses an 'apostrophe-friendly' syntax; it is run through
- * umsg_autoQuoteApostrophe
- * before being interpreted.
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the pattern used by the formatter
- * @link https://php.net/manual/en/messageformatter.getpattern.php
- * @return string The pattern string for this message formatter
- */
- #[Pure]
- public function getPattern() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the locale for which the formatter was created.
- * @link https://php.net/manual/en/messageformatter.getlocale.php
- * @return string The locale name
- */
- #[Pure]
- public function getLocale() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the error code from last operation
- * @link https://php.net/manual/en/messageformatter.geterrorcode.php
- * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the error text from the last operation
- * @link https://php.net/manual/en/messageformatter.geterrormessage.php
- * @return string Description of the last error.
- */
- #[Pure]
- public function getErrorMessage() {}
+ public const FORWARD = 0;
+ public const REVERSE = 1;
+
+ #[TypeAware(['8.1' => 'string'], default: '')]
+ public $id;
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Private constructor to deny instantiation
+ * @link https://php.net/manual/en/transliterator.construct.php
+ */
+ final private function __construct() {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Create a transliterator
+ * @link https://php.net/manual/en/transliterator.create.php
+ * @param string $id
+ * The id.
+ *
+ * @param int $direction [optional]
+ * The direction, defaults to
+ * Transliterator::FORWARD.
+ * May also be set to
+ * Transliterator::REVERSE.
+ *
+ * @return Transliterator|null a Transliterator object on success,
+ * or NULL on failure.
+ */
+ #[TentativeType]
+ public static function create(
+ #[TypeAware(['8.0' => 'string'], default: '')] $id,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
+ ): ?Transliterator {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Create transliterator from rules
+ * @link https://php.net/manual/en/transliterator.createfromrules.php
+ * @param string $rules
+ * The rules.
+ *
+ * @param int $direction [optional]
+ * The direction, defaults to
+ * {@see Transliterator::FORWARD}.
+ * May also be set to
+ * {@see Transliterator::REVERSE}.
+ *
+ * @return Transliterator|null a Transliterator object on success,
+ * or NULL on failure.
+ */
+ #[TentativeType]
+ public static function createFromRules(
+ #[TypeAware(['8.0' => 'string'], default: '')] $rules,
+ #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
+ ): ?Transliterator {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Create an inverse transliterator
+ * @link https://php.net/manual/en/transliterator.createinverse.php
+ * @return Transliterator|null a Transliterator object on success,
+ * or NULL on failure
+ */
+ #[Pure]
+ #[TentativeType]
+ public function createInverse(): ?Transliterator {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Get transliterator IDs
+ * @link https://php.net/manual/en/transliterator.listids.php
+ * @return array|false An array of registered transliterator IDs on success,
+ * or FALSE on failure.
+ */
+ #[TentativeType]
+ public static function listIDs(): array|false {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Transliterate a string
+ * @link https://php.net/manual/en/transliterator.transliterate.php
+ * @param string $string
+ * The string to be transformed.
+ *
+ * @param int $start [optional]
+ * The start index (in UTF-16 code units) from which the string will start
+ * to be transformed, inclusive. Indexing starts at 0. The text before will
+ * be left as is.
+ *
+ * @param int $end [optional]
+ * The end index (in UTF-16 code units) until which the string will be
+ * transformed, exclusive. Indexing starts at 0. The text after will be
+ * left as is.
+ *
+ * @return string|false The transfomed string on success, or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function transliterate(
+ #[TypeAware(['8.0' => 'string'], default: '')] $string,
+ #[TypeAware(['8.0' => 'int'], default: '')] $start = null,
+ #[TypeAware(['8.0' => 'int'], default: '')] $end = -1
+ ): string|false {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Get last error code
+ * @link https://php.net/manual/en/transliterator.geterrorcode.php
+ * @return int|false The error code on success,
+ * or FALSE if none exists, or on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int|false {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Get last error message
+ * @link https://php.net/manual/en/transliterator.geterrormessage.php
+ * @return string|false The error code on success,
+ * or FALSE if none exists, or on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string|false {}
}
-class IntlDateFormatter
+/**
+ * @link https://php.net/manual/en/class.spoofchecker.php
+ */
+class Spoofchecker
{
- /**
- * Completely specified style (Tuesday, April 12, 1952 AD or 3:30:42pm PST)
- * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
- */
- public const FULL = 0;
-
- /**
- * Long style (January 12, 1952 or 3:30:32pm)
- * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
- */
- public const LONG = 1;
-
- /**
- * Medium style (Jan 12, 1952)
- * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
- */
- public const MEDIUM = 2;
-
- /**
- * Most abbreviated style, only essential data (12/13/52 or 3:30pm)
- * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
- */
- public const SHORT = 3;
-
- /**
- * Do not include this element
- * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
- */
- public const NONE = -1;
-
- /**
- * Gregorian Calendar
- * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
- */
- public const GREGORIAN = 1;
-
- /**
- * Non-Gregorian Calendar
- * @link https://php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants
- */
- public const TRADITIONAL = 0;
-
- public const RELATIVE_FULL = 128;
- public const RELATIVE_LONG = 129;
- public const RELATIVE_MEDIUM = 130;
- public const RELATIVE_SHORT = 131;
-
- /**
- * @param string|null $locale
- * @param int $dateType [optional]
- * @param int $timeType [optional]
- * @param mixed|null $timezone [optional]
- * @param mixed|null $calendar [optional]
- * @param string $pattern [optional]
- */
- #[Pure]
- public function __construct(
- #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
- #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
- $timezone = null,
- $calendar = null,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Create a date formatter
- * @link https://php.net/manual/en/intldateformatter.create.php
- * @param string $locale
- * Locale to use when formatting or parsing; default is specified in the ini setting intl.default_locale.
- *
- * @param int $dateType [optional]
- * Date type to use (none,
- * short, medium,
- * long, full).
- * This is one of the
- * IntlDateFormatter constants.
- *
- * @param int $timeType [optional]
- * Time type to use (none,
- * short, medium,
- * long, full).
- * This is one of the
- * IntlDateFormatter constants.
- *
- * @param string $timezone [optional]
- * Time zone ID, default is system default.
- *
- * @param int $calendar [optional]
- * Calendar to use for formatting or parsing; default is Gregorian.
- * This is one of the
- * IntlDateFormatter calendar constants.
- *
- * @param string $pattern [optional]
- * Optional pattern to use when formatting or parsing.
- * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
- *
- * @return IntlDateFormatter
- */
- public static function create(
- #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[TypeAware(['8.0' => 'int'], default: '')] $dateType,
- #[TypeAware(['8.0' => 'int'], default: '')] $timeType,
- $timezone = null,
- #[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = ''
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the datetype used for the IntlDateFormatter
- * @link https://php.net/manual/en/intldateformatter.getdatetype.php
- * @return int The current date type value of the formatter.
- */
- #[Pure]
- public function getDateType() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the timetype used for the IntlDateFormatter
- * @link https://php.net/manual/en/intldateformatter.gettimetype.php
- * @return int The current date type value of the formatter.
- */
- #[Pure]
- public function getTimeType() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the calendar used for the IntlDateFormatter
- * @link https://php.net/manual/en/intldateformatter.getcalendar.php
- * @return int The calendar being used by the formatter.
- */
- #[Pure]
- public function getCalendar() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * sets the calendar used to the appropriate calendar, which must be
- * @link https://php.net/manual/en/intldateformatter.setcalendar.php
- * @param int $calendar
- * The calendar to use.
- * Default is IntlDateFormatter::GREGORIAN.
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setCalendar(#[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the timezone-id used for the IntlDateFormatter
- * @link https://php.net/manual/en/intldateformatter.gettimezoneid.php
- * @return string ID string for the time zone used by this formatter.
- */
- #[Pure]
- public function getTimeZoneId() {}
-
- /**
- * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
- * Get copy of formatter's calendar object
- * @link https://secure.php.net/manual/en/intldateformatter.getcalendarobject.php
- * @return IntlCalendar A copy of the internal calendar object used by this formatter.
- */
- #[Pure]
- public function getCalendarObject() {}
-
- /**
- * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
- * Get formatter's timezone
- * @link https://secure.php.net/manual/en/intldateformatter.gettimezone.php
- * @return IntlTimeZone|false The associated IntlTimeZone object or FALSE on failure.
- */
- #[Pure]
- public function getTimeZone() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Sets the time zone to use
- * @link https://php.net/manual/en/intldateformatter.settimezoneid.php
- * @param string $zone
- * The time zone ID string of the time zone to use.
- * If NULL or the empty string, the default time zone for the runtime is used.
- *
- * @return bool TRUE on success or FALSE on failure.
- * @removed 7.0
- * @see IntlDateFormatter::setTimeZone()
- */
- #[Deprecated(replacement: "%class%->setTimeZone(%parametersList%)", since: "5.5")]
- public function setTimeZoneId($zone) {}
-
- /**
- * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
- * Sets formatter's timezone
- * @link https://php.net/manual/en/intldateformatter.settimezone.php
- * @param mixed $timezone
- * The timezone to use for this formatter. This can be specified in the
- * following forms:
- *
- * -
- *
- * NULL, in which case the default timezone will be used, as specified in
- * the ini setting {@link "https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone" date.timezone} or
- * through the function {@link "https://secure.php.net/manual/en/function.date-default-timezone-set.php" date_default_timezone_set()} and as
- * returned by {@link "https://secure.php.net/manual/en/function.date-default-timezone-get.php" date_default_timezone_get()}.
- *
- *
- * -
- *
- * An {@link "https://secure.php.net/manual/en/class.intltimezone.php" IntlTimeZone}, which will be used directly.
- *
- *
- * -
- *
- * A {@link "https://secure.php.net/manual/en/class.datetimezone.php" DateTimeZone}. Its identifier will be extracted
- * and an ICU timezone object will be created; the timezone will be backed
- * by ICU's database, not PHP's.
- *
- *
- * -
- *
- * A {@link "https://secure.php.net/manual/en/language.types.string.php" string}, which should be a valid ICU timezone identifier.
- * See IntlTimeZone::createTimeZoneIDEnumeration(). Raw offsets such as "GMT+08:30" are also accepted.
- *
- *
- *
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setTimeZone($timezone) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set the pattern used for the IntlDateFormatter
- * @link https://php.net/manual/en/intldateformatter.setpattern.php
- * @param string $pattern
- * New pattern string to use.
- * Possible patterns are documented at http://userguide.icu-project.org/formatparse/datetime.
- *
- * @return bool TRUE on success or FALSE on failure.
- * Bad formatstrings are usually the cause of the failure.
- */
- public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the pattern used for the IntlDateFormatter
- * @link https://php.net/manual/en/intldateformatter.getpattern.php
- * @return string The pattern string being used to format/parse.
- */
- #[Pure]
- public function getPattern() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the locale used by formatter
- * @link https://php.net/manual/en/intldateformatter.getlocale.php
- * @param int $type [optional]
- * @return string|false the locale of this formatter or 'false' if error
- */
- #[Pure]
- public function getLocale(
- #[ElementAvailable(from: '8.0')]
- #[TypeAware(['8.0' => 'int'], default: '')]
- $type = null
- ) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Set the leniency of the parser
- * @link https://php.net/manual/en/intldateformatter.setlenient.php
- * @param bool $lenient
- * Sets whether the parser is lenient or not, default is TRUE (lenient).
- *
- * @return bool TRUE on success or FALSE on failure.
- */
- public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the lenient used for the IntlDateFormatter
- * @link https://php.net/manual/en/intldateformatter.islenient.php
- * @return bool TRUE if parser is lenient, FALSE if parser is strict. By default the parser is lenient.
- */
- #[Pure]
- public function isLenient() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Format the date/time value as a string
- * @link https://php.net/manual/en/intldateformatter.format.php
- * @param mixed $datetime
- * Value to format. This may be a DateTime object,
- * an integer representing a Unix timestamp value (seconds
- * since epoch, UTC) or an array in the format output by
- * localtime.
- *
- * @return string|false The formatted string or, if an error occurred, FALSE.
- */
- public function format($datetime = null, #[ElementAvailable(from: '5.3', to: '7.4')] $array = null) {}
-
- /**
- * (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)
- * Formats an object
- * @link https://secure.php.net/manual/en/intldateformatter.formatobject.php
- * @param object $datetime
- * An object of type {@link "https://secure.php.net/manual/en/class.intlcalendar.php" IntlCalendar} or {@link "https://secure.php.net/manual/en/class.datetime.php" DateTime}. The timezone information in the object will be used.
- *
- * @param mixed $format [optional]
- * How to format the date/time. This can either be an {@link "https://secure.php.net/manual/en/language.types.array.php" array} with
- * two elements (first the date style, then the time style, these being one
- * of the constants IntlDateFormatter::NONE,
- * IntlDateFormatter::SHORT,
- * IntlDateFormatter::MEDIUM,
- * IntlDateFormatter::LONG,
- * IntlDateFormatter::FULL), a long with
- * the value of one of these constants (in which case it will be used both
- * for the time and the date) or a {@link "https://secure.php.net/manual/en/language.types.string.php" string} with the format
- * described in {@link "http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details" the ICU documentation}.
- * If NULL, the default style will be used.
- *
- * @param string|null $locale [optional]
- * The locale to use, or NULL to use the {@link "https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale" default one}.
- * @return string|false A string with result or FALSE on failure.
- */
- public static function formatObject($datetime, $format = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Parse string to a timestamp value
- * @link https://php.net/manual/en/intldateformatter.parse.php
- * @param string $string
- * string to convert to a time
- *
- * @param int &$offset [optional]
- * Position at which to start the parsing in $value (zero-based).
- * If no error occurs before $value is consumed, $parse_pos will contain -1
- * otherwise it will contain the position at which parsing ended (and the error occurred).
- * This variable will contain the end position if the parse fails.
- * If $parse_pos > strlen($value), the parse fails immediately.
- *
- * @return int timestamp parsed value
- */
- public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Parse string to a field-based time value
- * @link https://php.net/manual/en/intldateformatter.localtime.php
- * @param string $string
- * string to convert to a time
- *
- * @param int &$offset [optional]
- * Position at which to start the parsing in $value (zero-based).
- * If no error occurs before $value is consumed, $parse_pos will contain -1
- * otherwise it will contain the position at which parsing ended .
- * If $parse_pos > strlen($value), the parse fails immediately.
- *
- * @return array Localtime compatible array of integers : contains 24 hour clock value in tm_hour field
- */
- public function localtime(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null) {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the error code from last operation
- * @link https://php.net/manual/en/intldateformatter.geterrorcode.php
- * @return int The error code, one of UErrorCode values. Initial value is U_ZERO_ERROR.
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
- * Get the error text from the last operation.
- * @link https://php.net/manual/en/intldateformatter.geterrormessage.php
- * @return string Description of the last error.
- */
- #[Pure]
- public function getErrorMessage() {}
+ public const SINGLE_SCRIPT_CONFUSABLE = 1;
+ public const MIXED_SCRIPT_CONFUSABLE = 2;
+ public const WHOLE_SCRIPT_CONFUSABLE = 4;
+ public const ANY_CASE = 8;
+ public const SINGLE_SCRIPT = 16;
+ public const INVISIBLE = 32;
+ public const CHAR_LIMIT = 64;
+ public const ASCII = 268435456;
+ public const HIGHLY_RESTRICTIVE = 805306368;
+ public const MODERATELY_RESTRICTIVE = 1073741824;
+ public const MINIMALLY_RESTRICTIVE = 1342177280;
+ public const UNRESTRICTIVE = 1610612736;
+ public const SINGLE_SCRIPT_RESTRICTIVE = 536870912;
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Constructor
+ * @link https://php.net/manual/en/spoofchecker.construct.php
+ */
+ #[Pure]
+ public function __construct() {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Checks if a given text contains any suspicious characters
+ * @link https://php.net/manual/en/spoofchecker.issuspicious.php
+ * @param string $string
+ *
+ * @param string &$errorCode [optional]
+ *
+ * @return bool
+ */
+ #[TentativeType]
+ public function isSuspicious(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$errorCode = null): bool {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Checks if a given text contains any confusable characters
+ * @link https://php.net/manual/en/spoofchecker.areconfusable.php
+ * @param string $string1
+ *
+ * @param string $string2
+ *
+ * @param string &$errorCode [optional]
+ *
+ * @return bool
+ */
+ #[TentativeType]
+ public function areConfusable(
+ #[TypeAware(['8.0' => 'string'], default: '')] $string1,
+ #[TypeAware(['8.0' => 'string'], default: '')] $string2,
+ &$errorCode = null
+ ): bool {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Locales to use when running checks
+ * @link https://php.net/manual/en/spoofchecker.setallowedlocales.php
+ * @param string $locales
+ *
+ * @return void
+ */
+ #[TentativeType]
+ public function setAllowedLocales(#[TypeAware(['8.0' => 'string'], default: '')] $locales): void {}
+
+ /**
+ * (PHP >= 5.4.0, PECL intl >= 2.0.0)
+ * Set the checks to run
+ * @link https://php.net/manual/en/spoofchecker.setchecks.php
+ * @param int $checks
+ *
+ * @return void
+ */
+ #[TentativeType]
+ public function setChecks(#[TypeAware(['8.0' => 'int'], default: '')] $checks): void {}
+
+ #[TentativeType]
+ public function setRestrictionLevel(int $level): void {}
}
-class ResourceBundle implements IteratorAggregate, Countable
+/**
+ * @since 5.5
+ */
+class IntlGregorianCalendar extends IntlCalendar
{
- /**
- * @link https://www.php.net/manual/en/resourcebundle.create.php
- * @param string $locale Locale for which the resources should be loaded (locale name, e.g. en_CA).
- * @param string $bundle The directory where the data is stored or the name of the .dat file.
- * @param bool $fallback [optional] Whether locale should match exactly or fallback to parent locale is allowed.
- */
- #[Pure]
- public function __construct(
- #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
- #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
- ) {}
-
- /**
- * (PHP >= 5.3.2, PECL intl >= 2.0.0)
- * Create a resource bundle
- * @link https://php.net/manual/en/resourcebundle.create.php
- * @param string $locale
- * Locale for which the resources should be loaded (locale name, e.g. en_CA).
- *
- * @param string $bundle
- * The directory where the data is stored or the name of the .dat file.
- *
- * @param bool $fallback [optional]
- * Whether locale should match exactly or fallback to parent locale is allowed.
- *
- * @return ResourceBundle|false ResourceBundle object or FALSE on error.
- */
- public static function create(
- #[TypeAware(['8.0' => 'string|null'], default: '')] $locale,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle,
- #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true
- ) {}
-
- /**
- * (PHP >= 5.3.2, PECL intl >= 2.0.0)
- * Get data from the bundle
- * @link https://php.net/manual/en/resourcebundle.get.php
- * @param string|int $index
- * Data index, must be string or integer.
- *
- * @param bool $fallback
- * @return mixed the data located at the index or NULL on error. Strings, integers and binary data strings
- * are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are
- * returned as ResourceBundle object.
- */
- #[Pure]
- public function get($index, #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true) {}
-
- /**
- * (PHP >= 5.3.2, PECL intl >= 2.0.0)
- * Get number of elements in the bundle
- * @link https://php.net/manual/en/resourcebundle.count.php
- * @return int number of elements in the bundle.
- */
- #[Pure]
- public function count() {}
-
- /**
- * (PHP >= 5.3.2, PECL intl >= 2.0.0)
- * Get supported locales
- * @link https://php.net/manual/en/resourcebundle.locales.php
- * @param string $bundle
- * Path of ResourceBundle for which to get available locales, or
- * empty string for default locales list.
- *
- * @return array the list of locales supported by the bundle.
- */
- public static function getLocales(#[TypeAware(['8.0' => 'string'], default: '')] $bundle) {}
-
- /**
- * (PHP >= 5.3.2, PECL intl >= 2.0.0)
- * Get bundle's last error code.
- * @link https://php.net/manual/en/resourcebundle.geterrorcode.php
- * @return int error code from last bundle object call.
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP >= 5.3.2, PECL intl >= 2.0.0)
- * Get bundle's last error message.
- * @link https://php.net/manual/en/resourcebundle.geterrormessage.php
- * @return string error message from last bundle object's call.
- */
- #[Pure]
- public function getErrorMessage() {}
-
- /**
- * @return Traversable
- * @since 8.0
- */
- #[Pure]
- public function getIterator() {}
+ /**
+ * @link https://www.php.net/manual/en/intlgregoriancalendar.construct
+ * @param int $timezoneOrYear [optional]
+ * @param int $localeOrMonth [optional]
+ * @param int $day [optional]
+ * @param int $hour [optional]
+ * @param int $minute [optional]
+ * @param int $second [optional]
+ */
+ public function __construct($timezoneOrYear, $localeOrMonth, $day, $hour, $minute, $second) {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * @param mixed $timeZone
+ * @param string $locale
+ * @return IntlGregorianCalendar
+ */
+ public static function createInstance($timeZone = null, $locale = null) {}
+
+ /**
+ * @param float $timestamp
+ */
+ #[TentativeType]
+ public function setGregorianChange(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp): bool {}
+
+ /**
+ * @return float
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getGregorianChange(): float {}
+
+ /**
+ * @param int $year
+ * @return bool
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isLeapYear(#[TypeAware(['8.0' => 'int'], default: '')] $year): bool {}
}
/**
- * @since 5.4
+ * @since 5.5
*/
-class Transliterator
+class IntlCalendar
{
- public const FORWARD = 0;
- public const REVERSE = 1;
-
- #[TypeAware(['8.1' => 'string'], default: '')]
- public $id;
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Private constructor to deny instantiation
- * @link https://php.net/manual/en/transliterator.construct.php
- */
- final private function __construct() {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Create a transliterator
- * @link https://php.net/manual/en/transliterator.create.php
- * @param string $id
- * The id.
- *
- * @param int $direction [optional]
- * The direction, defaults to
- * Transliterator::FORWARD.
- * May also be set to
- * Transliterator::REVERSE.
- *
- * @return Transliterator|null a Transliterator object on success,
- * or NULL on failure.
- */
- public static function create(
- #[TypeAware(['8.0' => 'string'], default: '')] $id,
- #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
- ) {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Create transliterator from rules
- * @link https://php.net/manual/en/transliterator.createfromrules.php
- * @param string $rules
- * The rules.
- *
- * @param int $direction [optional]
- * The direction, defaults to
- * {@see Transliterator::FORWARD}.
- * May also be set to
- * {@see Transliterator::REVERSE}.
- *
- * @return Transliterator|null a Transliterator object on success,
- * or NULL on failure.
- */
- public static function createFromRules(
- #[TypeAware(['8.0' => 'string'], default: '')] $rules,
- #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null
- ) {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Create an inverse transliterator
- * @link https://php.net/manual/en/transliterator.createinverse.php
- * @return Transliterator|null a Transliterator object on success,
- * or NULL on failure
- */
- #[Pure]
- public function createInverse() {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Get transliterator IDs
- * @link https://php.net/manual/en/transliterator.listids.php
- * @return array An array of registered transliterator IDs on success,
- * or FALSE on failure.
- */
- public static function listIDs() {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Transliterate a string
- * @link https://php.net/manual/en/transliterator.transliterate.php
- * @param string $string
- * The string to be transformed.
- *
- * @param int $start [optional]
- * The start index (in UTF-16 code units) from which the string will start
- * to be transformed, inclusive. Indexing starts at 0. The text before will
- * be left as is.
- *
- * @param int $end [optional]
- * The end index (in UTF-16 code units) until which the string will be
- * transformed, exclusive. Indexing starts at 0. The text after will be
- * left as is.
- *
- * @return string|false The transfomed string on success, or FALSE on failure.
- */
- #[Pure]
- public function transliterate(
- #[TypeAware(['8.0' => 'string'], default: '')] $string,
- #[TypeAware(['8.0' => 'int'], default: '')] $start = null,
- #[TypeAware(['8.0' => 'int'], default: '')] $end = -1
- ) {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Get last error code
- * @link https://php.net/manual/en/transliterator.geterrorcode.php
- * @return int|false The error code on success,
- * or FALSE if none exists, or on failure.
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Get last error message
- * @link https://php.net/manual/en/transliterator.geterrormessage.php
- * @return string|false The error code on success,
- * or FALSE if none exists, or on failure.
- */
- #[Pure]
- public function getErrorMessage() {}
-}
+ /* Constants */
+ public const FIELD_ERA = 0;
+ public const FIELD_YEAR = 1;
+ public const FIELD_MONTH = 2;
+ public const FIELD_WEEK_OF_YEAR = 3;
+ public const FIELD_WEEK_OF_MONTH = 4;
+ public const FIELD_DATE = 5;
+ public const FIELD_DAY_OF_YEAR = 6;
+ public const FIELD_DAY_OF_WEEK = 7;
+ public const FIELD_DAY_OF_WEEK_IN_MONTH = 8;
+ public const FIELD_AM_PM = 9;
+ public const FIELD_HOUR = 10;
+ public const FIELD_HOUR_OF_DAY = 11;
+ public const FIELD_MINUTE = 12;
+ public const FIELD_SECOND = 13;
+ public const FIELD_MILLISECOND = 14;
+ public const FIELD_ZONE_OFFSET = 15;
+ public const FIELD_DST_OFFSET = 16;
+ public const FIELD_YEAR_WOY = 17;
+ public const FIELD_DOW_LOCAL = 18;
+ public const FIELD_EXTENDED_YEAR = 19;
+ public const FIELD_JULIAN_DAY = 20;
+ public const FIELD_MILLISECONDS_IN_DAY = 21;
+ public const FIELD_IS_LEAP_MONTH = 22;
+ public const FIELD_FIELD_COUNT = 23;
+ public const FIELD_DAY_OF_MONTH = 5;
+ public const DOW_SUNDAY = 1;
+ public const DOW_MONDAY = 2;
+ public const DOW_TUESDAY = 3;
+ public const DOW_WEDNESDAY = 4;
+ public const DOW_THURSDAY = 5;
+ public const DOW_FRIDAY = 6;
+ public const DOW_SATURDAY = 7;
+ public const DOW_TYPE_WEEKDAY = 0;
+ public const DOW_TYPE_WEEKEND = 1;
+ public const DOW_TYPE_WEEKEND_OFFSET = 2;
+ public const DOW_TYPE_WEEKEND_CEASE = 3;
+ public const WALLTIME_FIRST = 1;
+ public const WALLTIME_LAST = 0;
+ public const WALLTIME_NEXT_VALID = 2;
+
+ /* Methods */
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Add a (signed) amount of time to a field
+ * @link https://secure.php.net/manual/en/intlcalendar.add.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
+ * These are integer values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @param int $value The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type.
+ * For instance, hours for IntlCalendar::FIELD_HOUR_OF_DAY.
+ * @return bool Returns TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function add(
+ #[TypeAware(['8.0' => 'int'], default: '')] $field,
+ #[TypeAware(['8.0' => 'int'], default: '')] $value
+ ): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Whether this object's time is after that of the passed object
+ * https://secure.php.net/manual/en/intlcalendar.after.php
+ * @param IntlCalendar $other The calendar whose time will be checked against this object's time.
+ * @return bool
+ * Returns TRUE if this object's current time is after that of the
+ * calendar argument's time. Returns FALSE otherwise.
+ * Also returns FALSE on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
+ * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function after(IntlCalendar $other): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Whether this object's time is before that of the passed object
+ * @link https://secure.php.net/manual/en/intlcalendar.before.php
+ * @param IntlCalendar $other The calendar whose time will be checked against this object's time.
+ * @return bool
+ * Returns TRUE if this object's current time is before that of the
+ * calendar argument's time. Returns FALSE otherwise.
+ * Also returns FALSE on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
+ * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function before(IntlCalendar $other): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Clear a field or all fields
+ * @link https://secure.php.net/manual/en/intlcalendar.clear.php
+ * @param int $field [optional]
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return bool Returns TRUE on success or FALSE on failure. Failure can only occur is invalid arguments are provided.
+ */
+ public function clear(#[TypeAware(['8.0' => 'int|null'], default: '')] $field = null) {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Private constructor for disallowing instantiation
+ * @link https://secure.php.net/manual/en/intlcalendar.construct.php
+ */
+ private function __construct() {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Create a new IntlCalendar
+ * @link https://secure.php.net/manual/en/intlcalendar.createinstance.php
+ * @param mixed $timezone [optional]
+ * The timezone to use.
+ *
+ *
+ *
+ * -
+ *
+ * NULL, in which case the default timezone will be used, as specified in
+ * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
+ * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
+ * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
+ *
+ *
+ * -
+ *
+ * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
+ *
+ *
+ * -
+ *
+ * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
+ * and an ICU timezone object will be created; the timezone will be backed
+ * by ICU's database, not PHP's.
+ *
+ *
+ * -
+ *
+ * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
+ * See IntlTimeZone::createTimeZoneIDEnumeration(). Raw
+ * offsets such as "GMT+08:30" are also accepted.
+ *
+ *
+ *
+ *
+ * @param string|null $locale [optional]
+ * A locale to use or NULL to use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}.
+ *
+ * @return IntlCalendar|null
+ * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or NULL on
+ * failure.
+ */
+ #[TentativeType]
+ public static function createInstance($timezone = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlCalendar {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Compare time of two IntlCalendar objects for equality
+ * @link https://secure.php.net/manual/en/intlcalendar.equals.php
+ * @param IntlCalendar $other
+ * @return bool
+ * Returns TRUE if the current time of both this and the passed in
+ * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or FALSE
+ * otherwise. The value FALSE can also be returned on failure. This can only
+ * happen if bad arguments are passed in. In any case, the two cases can be
+ * distinguished by calling {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}.
+ *
+ */
+ #[Pure]
+ #[TentativeType]
+ public function equals(#[TypeAware(['8.0' => 'IntlCalendar'], default: '')] $other): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Calculate difference between given time and this object's time
+ * @link https://secure.php.net/manual/en/intlcalendar.fielddifference.php
+ * @param float $timestamp
+ * The time against which to compare the quantity represented by the
+ * field. For the result to be positive, the time
+ * given for this parameter must be ahead of the time of the object the
+ * method is being invoked on.
+ *
+ * @param int $field
+ * The field that represents the quantity being compared.
+ *
+ *
+ *
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return int Returns a (signed) difference of time in the unit associated with the
+ * specified field or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function fieldDifference(
+ #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
+ #[TypeAware(['8.0' => 'int'], default: '')] $field
+ ): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)
+ * Create an IntlCalendar from a DateTime object or string
+ * @link https://secure.php.net/manual/en/intlcalendar.fromdatetime.php
+ * @param mixed $datetime
+ * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://secure.php.net/manual/en/language.types.string.php string} that
+ * can be passed to {@link https://secure.php.net/manual/en/datetime.construct.php DateTime::__construct()}.
+ *
+ * @param $locale [optional]
+ * @return IntlCalendar|null
+ * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or NULL in case of
+ * failure. If a {@link https://secure.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs
+ * inside the {@link https://secure.php.net/manual/en/class.datetime.php DateTime} constructor is propagated.
+ */
+ #[TentativeType]
+ public static function fromDateTime(
+ #[TypeAware(['8.0' => 'DateTime|string'], default: '')] $datetime,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] #[ElementAvailable(from: '8.0')] $locale
+ ): ?IntlCalendar {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the value for a field
+ * @link https://secure.php.net/manual/en/intlcalendar.get.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return int An integer with the value of the time field.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function get(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * The maximum value for a field, considering the object's current time
+ * @link https://secure.php.net/manual/en/intlcalendar.getactualmaximum.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return int
+ * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated
+ * with the given field or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getActualMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * The minimum value for a field, considering the object's current time
+ * @link https://secure.php.net/manual/en/intlcalendar.getactualminimum.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
+ * These are integer values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return int
+ * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's
+ * unit or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getActualMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get array of locales for which there is data
+ * @link https://secure.php.net/manual/en/intlcalendar.getavailablelocales.php
+ * @return string[] An array of strings, one for which locale.
+ */
+ #[TentativeType]
+ public static function getAvailableLocales(): array {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Tell whether a day is a weekday, weekend or a day that has a transition between the two
+ * @param int $dayOfWeek
+ * One of the constants IntlCalendar::DOW_SUNDAY,
+ * IntlCalendar::DOW_MONDAY, ...,
+ * IntlCalendar::DOW_SATURDAY.
+ *
+ * @return int|false
+ * Returns one of the constants
+ * IntlCalendar::DOW_TYPE_WEEKDAY,
+ * IntlCalendar::DOW_TYPE_WEEKEND,
+ * IntlCalendar::DOW_TYPE_WEEKEND_OFFSET or
+ * IntlCalendar::DOW_TYPE_WEEKEND_CEASE or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDayOfWeekType(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get last error code on the object
+ * @link https://secure.php.net/manual/en/intlcalendar.geterrorcode.php
+ * @return int|false An ICU error code indicating either success, failure or a warning.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get last error message on the object
+ * @link https://secure.php.net/manual/en/intlcalendar.geterrormessage.php
+ * @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.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the first day of the week for the calendar's locale
+ * @link https://secure.php.net/manual/en/intlcalendar.getfirstdayofweek.php
+ * @return int|false
+ * One of the constants IntlCalendar::DOW_SUNDAY,
+ * IntlCalendar::DOW_MONDAY, ...,
+ * IntlCalendar::DOW_SATURDAY or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getFirstDayOfWeek(): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the largest local minimum value for a field
+ * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ * @return int|false
+ * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's
+ * unit, or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getGreatestMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get set of locale keyword values
+ * @param string $keyword
+ * The locale keyword for which relevant values are to be queried. Only
+ * 'calendar' is supported.
+ *
+ * @param string $locale
+ * The locale onto which the keyword/value pair are to be appended.
+ *
+ * @param bool $onlyCommon
+ *
+ * Whether to show only the values commonly used for the specified locale.
+ *
+ * @return Iterator|false An iterator that yields strings with the locale keyword values or FALSE on failure.
+ */
+ #[TentativeType]
+ public static function getKeywordValuesForLocale(
+ #[TypeAware(['8.0' => 'string'], default: '')] $keyword,
+ #[TypeAware(['8.0' => 'string'], default: '')] $locale,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $onlyCommon
+ ): IntlIterator|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the smallest local maximum for a field
+ * @link https://secure.php.net/manual/en/intlcalendar.getleastmaximum.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return int|false
+ * An {@link https://secure.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's
+ * unit or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLeastMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the locale associated with the object
+ * @link https://secure.php.net/manual/en/intlcalendar.getlocale.php
+ * @param int $type
+ * Whether to fetch the actual locale (the locale from which the calendar
+ * data originates, with Locale::ACTUAL_LOCALE) or the
+ * valid locale, i.e., the most specific locale supported by ICU relatively
+ * to the requested locale – see Locale::VALID_LOCALE.
+ * From the most general to the most specific, the locales are ordered in
+ * this fashion – actual locale, valid locale, requested locale.
+ *
+ * @return string
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the global maximum value for a field
+ * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return int|false
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get minimal number of days the first week in a year or month can have
+ * @link https://secure.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php
+ * @return int|false
+ * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a number of days or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getMinimalDaysInFirstWeek(): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the global minimum value for a field
+ * @link https://secure.php.net/manual/en/intlcalendar.getminimum.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return int|false
+ * An int representing a value for the given field in the field's unit or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get number representing the current time
+ * @return float A float representing a number of milliseconds since the epoch, not counting leap seconds.
+ */
+ #[TentativeType]
+ public static function getNow(): float {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get behavior for handling repeating wall time
+ * @link https://secure.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php
+ * @return int
+ * One of the constants IntlCalendar::WALLTIME_FIRST or
+ * IntlCalendar::WALLTIME_LAST.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getRepeatedWallTimeOption(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get behavior for handling skipped wall time
+ * @link https://secure.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php
+ * @return int
+ * One of the constants IntlCalendar::WALLTIME_FIRST,
+ * IntlCalendar::WALLTIME_LAST or
+ * IntlCalendar::WALLTIME_NEXT_VALID.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getSkippedWallTimeOption(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get time currently represented by the object
+ * @return float|false
+ * A {@link https://secure.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the
+ * reference time (1 Jan 1970 00:00:00 UTC).
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getTime(): float|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the object's timezone
+ * @link https://secure.php.net/manual/en/intlcalendar.gettimezone.php
+ * @return IntlTimeZone|false
+ * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used
+ * internally in this object.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getTimeZone(): IntlTimeZone|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the calendar type
+ * @link https://secure.php.net/manual/en/intlcalendar.gettype.php
+ * @return string
+ * A {@link https://secure.php.net/manual/en/language.types.string.php string} representing the calendar type, such as
+ * 'gregorian', 'islamic', etc.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getType(): string {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get time of the day at which weekend begins or ends
+ * @link https://secure.php.net/manual/en/intlcalendar.getweekendtransition.php
+ * @param string $dayOfWeek
+ * One of the constants IntlCalendar::DOW_SUNDAY,
+ * IntlCalendar::DOW_MONDAY, ...,
+ * IntlCalendar::DOW_SATURDAY.
+ *
+ * @return int|false
+ * The number of milliseconds into the day at which the the weekend begins or
+ * ends or FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getWeekendTransition(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Whether the object's time is in Daylight Savings Time
+ * @link https://secure.php.net/manual/en/intlcalendar.indaylighttime.php
+ * @return bool
+ * Returns TRUE if the date is in Daylight Savings Time, FALSE otherwise.
+ * The value FALSE may also be returned on failure, for instance after
+ * specifying invalid field values on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
+ * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function inDaylightTime(): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Whether another calendar is equal but for a different time
+ * @link https://secure.php.net/manual/en/intlcalendar.isequivalentto.php
+ * @param IntlCalendar $other The other calendar against which the comparison is to be made.
+ * @return bool
+ * Assuming there are no argument errors, returns TRUE iif the calendars are equivalent except possibly for their set time.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isEquivalentTo(IntlCalendar $other): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Whether date/time interpretation is in lenient mode
+ * @link https://secure.php.net/manual/en/intlcalendar.islenient.php
+ * @return bool
+ * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isLenient(): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Whether a certain date/time is in the weekend
+ * @link https://secure.php.net/manual/en/intlcalendar.isweekend.php
+ * @param float|null $timestamp [optional]
+ * An optional timestamp representing the number of milliseconds since the
+ * epoch, excluding leap seconds. If NULL, this object's current time is
+ * used instead.
+ *
+ * @return bool
+ * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs
+ * in a weekend.
+ *
+ *
+ * The value FALSE may also be returned on failure, for instance after giving
+ * a date out of bounds on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
+ * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isWeekend(#[TypeAware(['8.0' => 'float|null'], default: '')] $timestamp = null): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Add value to field without carrying into more significant fields
+ * @link https://secure.php.net/manual/en/intlcalendar.roll.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time
+ * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @param mixed $value
+ * The (signed) amount to add to the field, TRUE for rolling up (adding
+ * 1), or FALSE for rolling down (subtracting
+ * 1).
+ *
+ * @return bool Returns TRUE on success or FALSE on failure.
+ */
+ #[TentativeType]
+ public function roll(#[TypeAware(['8.0' => 'int'], default: '')] $field, $value): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Whether a field is set
+ * @link https://secure.php.net/manual/en/intlcalendar.isset.php
+ * @param int $field
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time
+ * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
+ * These are integer values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @return bool Assuming there are no argument errors, returns TRUE iif the field is set.
+ */
+ #[TentativeType]
+ public function PS_UNRESERVE_PREFIX_isSet(#[TypeAware(['8.0' => 'int'], default: '')] $field): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Set a time field or several common fields at once
+ * @link https://secure.php.net/manual/en/intlcalendar.set.php
+ * @param int $year
+ * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
+ * values between 0 and
+ * IntlCalendar::FIELD_COUNT.
+ *
+ * @param int $month
+ * The new value for IntlCalendar::FIELD_MONTH.
+ *
+ * @param int $dayOfMonth [optional]
+ * The new value for IntlCalendar::FIELD_DAY_OF_MONTH.
+ * The month sequence is zero-based, i.e., January is represented by 0,
+ * February by 1, ..., December is 11 and Undecember (if the calendar has
+ * it) is 12.
+ *
+ * @param int $hour [optional]
+ *
+ * The new value for IntlCalendar::FIELD_HOUR_OF_DAY.
+ *
+ * @param int $minute [optional]
+ *
+ * The new value for IntlCalendar::FIELD_MINUTE.
+ *
+ * @param int $second [optional]
+ * The new value for IntlCalendar::FIELD_SECOND.
+ *
+ * @return bool Returns TRUE on success and FALSE on failure.
+ */
+ public function set($year, $month, $dayOfMonth = null, $hour = null, $minute = null, $second = null) {}
+
+ /**
+ * (PHP 5 >= 5.5.0 PECL intl >= 3.0.0a1)
+ * Set a time field or several common fields at once
+ * @link https://secure.php.net/manual/en/intlcalendar.set.php
+ * @param int $field One of the IntlCalendar date/time field constants. These are integer values between 0 and IntlCalendar::FIELD_COUNT.
+ * @param int $value The new value of the given field.
+ * @return bool Returns TRUE on success and FALSE on failure.
+ * @since 5.5
+ */
+ public function set($field, $value) {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Set the day on which the week is deemed to start
+ * @link https://secure.php.net/manual/en/intlcalendar.setfirstdayofweek.php
+ * @param int $dayOfWeek
+ * One of the constants IntlCalendar::DOW_SUNDAY,
+ * IntlCalendar::DOW_MONDAY, ...,
+ * IntlCalendar::DOW_SATURDAY.
+ *
+ * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
+ */
+ public function setFirstDayOfWeek(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Set whether date/time interpretation is to be lenient
+ * @link https://secure.php.net/manual/en/intlcalendar.setlenient.php
+ * @param bool $lenient
+ * Use TRUE to activate the lenient mode; FALSE otherwise.
+ *
+ * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
+ */
+ public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient) {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Set behavior for handling repeating wall times at negative timezone offset transitions
+ * @link https://secure.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php
+ * @param int $option
+ * One of the constants IntlCalendar::WALLTIME_FIRST or
+ * IntlCalendar::WALLTIME_LAST.
+ *
+ * @return bool
+ * Returns TRUE on success. Failure can only happen due to invalid parameters.
+ */
+ public function setRepeatedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Set behavior for handling skipped wall times at positive timezone offset transitions
+ * @link https://secure.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php
+ * @param int $option
+ * One of the constants IntlCalendar::WALLTIME_FIRST,
+ * IntlCalendar::WALLTIME_LAST or
+ * IntlCalendar::WALLTIME_NEXT_VALID.
+ *
+ * @return bool
+ *
+ * Returns TRUE on success. Failure can only happen due to invalid parameters.
+ *
+ */
+ public function setSkippedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}
-/**
- * @link https://php.net/manual/en/class.spoofchecker.php
- */
-class Spoofchecker
-{
- public const SINGLE_SCRIPT_CONFUSABLE = 1;
- public const MIXED_SCRIPT_CONFUSABLE = 2;
- public const WHOLE_SCRIPT_CONFUSABLE = 4;
- public const ANY_CASE = 8;
- public const SINGLE_SCRIPT = 16;
- public const INVISIBLE = 32;
- public const CHAR_LIMIT = 64;
- public const ASCII = 268435456;
- public const HIGHLY_RESTRICTIVE = 805306368;
- public const MODERATELY_RESTRICTIVE = 1073741824;
- public const MINIMALLY_RESTRICTIVE = 1342177280;
- public const UNRESTRICTIVE = 1610612736;
- public const SINGLE_SCRIPT_RESTRICTIVE = 536870912;
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Constructor
- * @link https://php.net/manual/en/spoofchecker.construct.php
- */
- #[Pure]
- public function __construct() {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Checks if a given text contains any suspicious characters
- * @link https://php.net/manual/en/spoofchecker.issuspicious.php
- * @param string $string
- *
- * @param string &$errorCode [optional]
- *
- * @return bool
- */
- public function isSuspicious(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$errorCode = null) {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Checks if a given text contains any confusable characters
- * @link https://php.net/manual/en/spoofchecker.areconfusable.php
- * @param string $string1
- *
- * @param string $string2
- *
- * @param string &$errorCode [optional]
- *
- * @return bool
- */
- public function areConfusable(
- #[TypeAware(['8.0' => 'string'], default: '')] $string1,
- #[TypeAware(['8.0' => 'string'], default: '')] $string2,
- &$errorCode = null
- ) {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Locales to use when running checks
- * @link https://php.net/manual/en/spoofchecker.setallowedlocales.php
- * @param string $locales
- *
- * @return void
- */
- public function setAllowedLocales(#[TypeAware(['8.0' => 'string'], default: '')] $locales) {}
-
- /**
- * (PHP >= 5.4.0, PECL intl >= 2.0.0)
- * Set the checks to run
- * @link https://php.net/manual/en/spoofchecker.setchecks.php
- * @param int $checks
- *
- * @return void
- */
- public function setChecks(#[TypeAware(['8.0' => 'int'], default: '')] $checks) {}
-
- public function setRestrictionLevel(int $level) {}
-}
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Set the calendar time in milliseconds since the epoch
+ * @link https://secure.php.net/manual/en/intlcalendar.settime.php
+ * @param float $timestamp
+ * An instant represented by the number of number of milliseconds between
+ * such instant and the epoch, ignoring leap seconds.
+ *
+ * @return bool
+ * Returns TRUE on success and FALSE on failure.
+ */
+ #[TentativeType]
+ public function setTime(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp): bool {}
-/**
- * @since 5.5
- */
-class IntlGregorianCalendar extends IntlCalendar
-{
- /**
- * @link https://www.php.net/manual/en/intlgregoriancalendar.construct
- * @param int $timezoneOrYear [optional]
- * @param int $localeOrMonth [optional]
- * @param int $day [optional]
- * @param int $hour [optional]
- * @param int $minute [optional]
- * @param int $second [optional]
- */
- public function __construct($timezoneOrYear, $localeOrMonth, $day, $hour, $minute, $second) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * @param mixed $timeZone
- * @param string $locale
- * @return IntlGregorianCalendar
- */
- public static function createInstance($timeZone = null, $locale = null) {}
-
- /**
- * @param float $timestamp
- */
- public function setGregorianChange(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp) {}
-
- /**
- * @return float
- */
- #[Pure]
- public function getGregorianChange() {}
-
- /**
- * @param int $year
- * @return bool
- */
- #[Pure]
- public function isLeapYear(#[TypeAware(['8.0' => 'int'], default: '')] $year) {}
-}
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Set the timezone used by this calendar
+ * @link https://secure.php.net/manual/en/intlcalendar.settimezone.php
+ * @param mixed $timezone
+ * The new timezone to be used by this calendar. It can be specified in the
+ * following ways:
+ *
+ *
+ * -
+ *
+ * NULL, in which case the default timezone will be used, as specified in
+ * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
+ * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
+ * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
+ *
+ *
+ * -
+ *
+ * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
+ *
+ *
+ * -
+ *
+ * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
+ * and an ICU timezone object will be created; the timezone will be backed
+ * by ICU's database, not PHP's.
+ *
+ *
+ * -
+ *
+ * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
+ * See b>IntlTimeZone::createTimeZoneIDEnumeration(). Raw
+ * offsets such as "GMT+08:30" are also accepted.
+ *
+ *
+ *
+ * @return bool Returns TRUE on success and FALSE on failure.
+ */
+ #[TentativeType]
+ public function setTimeZone($timezone): bool {}
-/**
- * @since 5.5
- */
-class IntlCalendar
-{
- /* Constants */
- public const FIELD_ERA = 0;
- public const FIELD_YEAR = 1;
- public const FIELD_MONTH = 2;
- public const FIELD_WEEK_OF_YEAR = 3;
- public const FIELD_WEEK_OF_MONTH = 4;
- public const FIELD_DATE = 5;
- public const FIELD_DAY_OF_YEAR = 6;
- public const FIELD_DAY_OF_WEEK = 7;
- public const FIELD_DAY_OF_WEEK_IN_MONTH = 8;
- public const FIELD_AM_PM = 9;
- public const FIELD_HOUR = 10;
- public const FIELD_HOUR_OF_DAY = 11;
- public const FIELD_MINUTE = 12;
- public const FIELD_SECOND = 13;
- public const FIELD_MILLISECOND = 14;
- public const FIELD_ZONE_OFFSET = 15;
- public const FIELD_DST_OFFSET = 16;
- public const FIELD_YEAR_WOY = 17;
- public const FIELD_DOW_LOCAL = 18;
- public const FIELD_EXTENDED_YEAR = 19;
- public const FIELD_JULIAN_DAY = 20;
- public const FIELD_MILLISECONDS_IN_DAY = 21;
- public const FIELD_IS_LEAP_MONTH = 22;
- public const FIELD_FIELD_COUNT = 23;
- public const FIELD_DAY_OF_MONTH = 5;
- public const DOW_SUNDAY = 1;
- public const DOW_MONDAY = 2;
- public const DOW_TUESDAY = 3;
- public const DOW_WEDNESDAY = 4;
- public const DOW_THURSDAY = 5;
- public const DOW_FRIDAY = 6;
- public const DOW_SATURDAY = 7;
- public const DOW_TYPE_WEEKDAY = 0;
- public const DOW_TYPE_WEEKEND = 1;
- public const DOW_TYPE_WEEKEND_OFFSET = 2;
- public const DOW_TYPE_WEEKEND_CEASE = 3;
- public const WALLTIME_FIRST = 1;
- public const WALLTIME_LAST = 0;
- public const WALLTIME_NEXT_VALID = 2;
-
- /* Methods */
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Add a (signed) amount of time to a field
- * @link https://secure.php.net/manual/en/intlcalendar.add.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
- * These are integer values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @param int $value The signed amount to add to the current field. If the amount is positive, the instant will be moved forward; if it is negative, the instant wil be moved into the past. The unit is implicit to the field type.
- * For instance, hours for IntlCalendar::FIELD_HOUR_OF_DAY.
- * @return bool Returns TRUE on success or FALSE on failure.
- */
- public function add(
- #[TypeAware(['8.0' => 'int'], default: '')] $field,
- #[TypeAware(['8.0' => 'int'], default: '')] $value
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Whether this object's time is after that of the passed object
- * https://secure.php.net/manual/en/intlcalendar.after.php
- * @param IntlCalendar $other The calendar whose time will be checked against this object's time.
- * @return bool
- * Returns TRUE if this object's current time is after that of the
- * calendar argument's time. Returns FALSE otherwise.
- * Also returns FALSE on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
- * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
- */
- #[Pure]
- public function after(IntlCalendar $other) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Whether this object's time is before that of the passed object
- * @link https://secure.php.net/manual/en/intlcalendar.before.php
- * @param IntlCalendar $other The calendar whose time will be checked against this object's time.
- * @return bool
- * Returns TRUE if this object's current time is before that of the
- * calendar argument's time. Returns FALSE otherwise.
- * Also returns FALSE on failure. You can use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or
- * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to detect error conditions.
- */
- #[Pure]
- public function before(IntlCalendar $other) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Clear a field or all fields
- * @link https://secure.php.net/manual/en/intlcalendar.clear.php
- * @param int $field [optional]
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return bool Returns TRUE on success or FALSE on failure. Failure can only occur is invalid arguments are provided.
- */
- public function clear(#[TypeAware(['8.0' => 'int|null'], default: '')] $field = null) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Private constructor for disallowing instantiation
- * @link https://secure.php.net/manual/en/intlcalendar.construct.php
- */
- private function __construct() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Create a new IntlCalendar
- * @link https://secure.php.net/manual/en/intlcalendar.createinstance.php
- * @param mixed $timezone [optional]
- * The timezone to use.
- *
- *
- *
- * -
- *
- * NULL, in which case the default timezone will be used, as specified in
- * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
- * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
- * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
- *
- *
- * -
- *
- * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
- *
- *
- * -
- *
- * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
- * and an ICU timezone object will be created; the timezone will be backed
- * by ICU's database, not PHP's.
- *
- *
- * -
- *
- * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
- * See IntlTimeZone::createTimeZoneIDEnumeration(). Raw
- * offsets such as "GMT+08:30" are also accepted.
- *
- *
- *
- *
- * @param string|null $locale [optional]
- * A locale to use or NULL to use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.default-locale the default locale}.
- *
- * @return IntlCalendar|null
- * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} instance or NULL on
- * failure.
- */
- public static function createInstance($timezone = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Compare time of two IntlCalendar objects for equality
- * @link https://secure.php.net/manual/en/intlcalendar.equals.php
- * @param IntlCalendar $other
- * @return bool
- * Returns TRUE if the current time of both this and the passed in
- * {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object are the same, or FALSE
- * otherwise. The value FALSE can also be returned on failure. This can only
- * happen if bad arguments are passed in. In any case, the two cases can be
- * distinguished by calling {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()}.
- *
- */
- #[Pure]
- public function equals(#[TypeAware(['8.0' => 'IntlCalendar'], default: '')] $other) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Calculate difference between given time and this object's time
- * @link https://secure.php.net/manual/en/intlcalendar.fielddifference.php
- * @param float $timestamp
- * The time against which to compare the quantity represented by the
- * field. For the result to be positive, the time
- * given for this parameter must be ahead of the time of the object the
- * method is being invoked on.
- *
- * @param int $field
- * The field that represents the quantity being compared.
- *
- *
- *
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return int Returns a (signed) difference of time in the unit associated with the
- * specified field or FALSE on failure.
- */
- #[Pure]
- public function fieldDifference(
- #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
- #[TypeAware(['8.0' => 'int'], default: '')] $field
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)
- * Create an IntlCalendar from a DateTime object or string
- * @link https://secure.php.net/manual/en/intlcalendar.fromdatetime.php
- * @param mixed $datetime
- * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object or a {@link https://secure.php.net/manual/en/language.types.string.php string} that
- * can be passed to {@link https://secure.php.net/manual/en/datetime.construct.php DateTime::__construct()}.
- *
- * @param $locale [optional]
- * @return IntlCalendar|null
- * The created {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} object or NULL in case of
- * failure. If a {@link https://secure.php.net/manual/en/language.types.string.php string} is passed, any exception that occurs
- * inside the {@link https://secure.php.net/manual/en/class.datetime.php DateTime} constructor is propagated.
- */
- public static function fromDateTime(
- #[TypeAware(['8.0' => 'DateTime|string'], default: '')] $datetime,
- #[TypeAware(['8.0' => 'string|null'], default: '')] #[ElementAvailable(from: '8.0')] $locale
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the value for a field
- * @link https://secure.php.net/manual/en/intlcalendar.get.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return int An integer with the value of the time field.
- */
- #[Pure]
- public function get(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * The maximum value for a field, considering the object's current time
- * @link https://secure.php.net/manual/en/intlcalendar.getactualmaximum.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return int
- * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the maximum value in the units associated
- * with the given field or FALSE on failure.
- */
- #[Pure]
- public function getActualMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * The minimum value for a field, considering the object's current time
- * @link https://secure.php.net/manual/en/intlcalendar.getactualminimum.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
- * These are integer values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return int
- * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing the minimum value in the field's
- * unit or FALSE on failure.
- */
- #[Pure]
- public function getActualMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get array of locales for which there is data
- * @link https://secure.php.net/manual/en/intlcalendar.getavailablelocales.php
- * @return string[] An array of strings, one for which locale.
- */
- public static function getAvailableLocales() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Tell whether a day is a weekday, weekend or a day that has a transition between the two
- * @param int $dayOfWeek
- * One of the constants IntlCalendar::DOW_SUNDAY,
- * IntlCalendar::DOW_MONDAY, ...,
- * IntlCalendar::DOW_SATURDAY.
- *
- * @return int
- * Returns one of the constants
- * IntlCalendar::DOW_TYPE_WEEKDAY,
- * IntlCalendar::DOW_TYPE_WEEKEND,
- * IntlCalendar::DOW_TYPE_WEEKEND_OFFSET or
- * IntlCalendar::DOW_TYPE_WEEKEND_CEASE or FALSE on failure.
- */
- #[Pure]
- public function getDayOfWeekType(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get last error code on the object
- * @link https://secure.php.net/manual/en/intlcalendar.geterrorcode.php
- * @return int An ICU error code indicating either success, failure or a warning.
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get last error message on the object
- * @link https://secure.php.net/manual/en/intlcalendar.geterrormessage.php
- * @return string 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.
- */
- #[Pure]
- public function getErrorMessage() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the first day of the week for the calendar's locale
- * @link https://secure.php.net/manual/en/intlcalendar.getfirstdayofweek.php
- * @return int
- * One of the constants IntlCalendar::DOW_SUNDAY,
- * IntlCalendar::DOW_MONDAY, ...,
- * IntlCalendar::DOW_SATURDAY or FALSE on failure.
- */
- #[Pure]
- public function getFirstDayOfWeek() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the largest local minimum value for a field
- * @link https://secure.php.net/manual/en/intlcalendar.getgreatestminimum.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- * @return int
- * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a field value, in the field's
- * unit, or FALSE on failure.
- */
- #[Pure]
- public function getGreatestMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get set of locale keyword values
- * @param string $keyword
- * The locale keyword for which relevant values are to be queried. Only
- * 'calendar' is supported.
- *
- * @param string $locale
- * The locale onto which the keyword/value pair are to be appended.
- *
- * @param bool $onlyCommon
- *
- * Whether to show only the values commonly used for the specified locale.
- *
- * @return Iterator|false An iterator that yields strings with the locale keyword values or FALSE on failure.
- */
- public static function getKeywordValuesForLocale(
- #[TypeAware(['8.0' => 'string'], default: '')] $keyword,
- #[TypeAware(['8.0' => 'string'], default: '')] $locale,
- #[TypeAware(['8.0' => 'bool'], default: '')] $onlyCommon
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the smallest local maximum for a field
- * @link https://secure.php.net/manual/en/intlcalendar.getleastmaximum.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return int
- * An {@link https://secure.php.net/manual/en/language.types.integer.ph int} representing a field value in the field's
- * unit or FALSE on failure.
- */
- #[Pure]
- public function getLeastMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the locale associated with the object
- * @link https://secure.php.net/manual/en/intlcalendar.getlocale.php
- * @param int $type
- * Whether to fetch the actual locale (the locale from which the calendar
- * data originates, with Locale::ACTUAL_LOCALE) or the
- * valid locale, i.e., the most specific locale supported by ICU relatively
- * to the requested locale – see Locale::VALID_LOCALE.
- * From the most general to the most specific, the locales are ordered in
- * this fashion – actual locale, valid locale, requested locale.
- *
- * @return string
- */
- #[Pure]
- public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the global maximum value for a field
- * @link https://secure.php.net/manual/en/intlcalendar.getmaximum.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return int
- */
- #[Pure]
- public function getMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get minimal number of days the first week in a year or month can have
- * @link https://secure.php.net/manual/en/intlcalendar.getminimaldaysinfirstweek.php
- * @return int
- * An {@link https://secure.php.net/manual/en/language.types.integer.php int} representing a number of days or FALSE on failure.
- */
- #[Pure]
- public function getMinimalDaysInFirstWeek() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the global minimum value for a field
- * @link https://secure.php.net/manual/en/intlcalendar.getminimum.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return int
- * An int representing a value for the given field in the field's unit or FALSE on failure.
- */
- #[Pure]
- public function getMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get number representing the current time
- * @return float A float representing a number of milliseconds since the epoch, not counting leap seconds.
- */
- public static function getNow() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get behavior for handling repeating wall time
- * @link https://secure.php.net/manual/en/intlcalendar.getrepeatedwalltimeoption.php
- * @return int
- * One of the constants IntlCalendar::WALLTIME_FIRST or
- * IntlCalendar::WALLTIME_LAST.
- */
- #[Pure]
- public function getRepeatedWallTimeOption() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get behavior for handling skipped wall time
- * @link https://secure.php.net/manual/en/intlcalendar.getskippedwalltimeoption.php
- * @return int
- * One of the constants IntlCalendar::WALLTIME_FIRST,
- * IntlCalendar::WALLTIME_LAST or
- * IntlCalendar::WALLTIME_NEXT_VALID.
- */
- #[Pure]
- public function getSkippedWallTimeOption() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get time currently represented by the object
- * @return float
- * A {@link https://secure.php.net/manual/en/language.types.float.php float} representing the number of milliseconds elapsed since the
- * reference time (1 Jan 1970 00:00:00 UTC).
- */
- #[Pure]
- public function getTime() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the object's timezone
- * @link https://secure.php.net/manual/en/intlcalendar.gettimezone.php
- * @return IntlTimeZone
- * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone} object corresponding to the one used
- * internally in this object.
- */
- #[Pure]
- public function getTimeZone() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the calendar type
- * @link https://secure.php.net/manual/en/intlcalendar.gettype.php
- * @return string
- * A {@link https://secure.php.net/manual/en/language.types.string.php string} representing the calendar type, such as
- * 'gregorian', 'islamic', etc.
- */
- #[Pure]
- public function getType() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get time of the day at which weekend begins or ends
- * @link https://secure.php.net/manual/en/intlcalendar.getweekendtransition.php
- * @param string $dayOfWeek
- * One of the constants IntlCalendar::DOW_SUNDAY,
- * IntlCalendar::DOW_MONDAY, ...,
- * IntlCalendar::DOW_SATURDAY.
- *
- * @return int
- * The number of milliseconds into the day at which the the weekend begins or
- * ends or FALSE on failure.
- */
- #[Pure]
- public function getWeekendTransition(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Whether the object's time is in Daylight Savings Time
- * @link https://secure.php.net/manual/en/intlcalendar.indaylighttime.php
- * @return bool
- * Returns TRUE if the date is in Daylight Savings Time, FALSE otherwise.
- * The value FALSE may also be returned on failure, for instance after
- * specifying invalid field values on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
- * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.
- */
- #[Pure]
- public function inDaylightTime() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Whether another calendar is equal but for a different time
- * @link https://secure.php.net/manual/en/intlcalendar.isequivalentto.php
- * @param IntlCalendar $other The other calendar against which the comparison is to be made.
- * @return bool
- * Assuming there are no argument errors, returns TRUE iif the calendars are equivalent except possibly for their set time.
- */
- #[Pure]
- public function isEquivalentTo(IntlCalendar $other) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Whether date/time interpretation is in lenient mode
- * @link https://secure.php.net/manual/en/intlcalendar.islenient.php
- * @return bool
- * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} representing whether the calendar is set to lenient mode.
- */
- #[Pure]
- public function isLenient() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Whether a certain date/time is in the weekend
- * @link https://secure.php.net/manual/en/intlcalendar.isweekend.php
- * @param float|null $timestamp [optional]
- * An optional timestamp representing the number of milliseconds since the
- * epoch, excluding leap seconds. If NULL, this object's current time is
- * used instead.
- *
- * @return bool
- * A {@link https://secure.php.net/manual/en/language.types.boolean.php bool} indicating whether the given or this object's time occurs
- * in a weekend.
- *
- *
- * The value FALSE may also be returned on failure, for instance after giving
- * a date out of bounds on non-lenient mode; use {@link https://secure.php.net/manual/en/intl.configuration.php#ini.intl.use-exceptions exceptions} or query
- * {@link https://secure.php.net/manual/en/function.intl-get-error-code.php intl_get_error_code()} to disambiguate.
- */
- #[Pure]
- public function isWeekend(#[TypeAware(['8.0' => 'float|null'], default: '')] $timestamp = null) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Add value to field without carrying into more significant fields
- * @link https://secure.php.net/manual/en/intlcalendar.roll.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time
- * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @param mixed $value
- * The (signed) amount to add to the field, TRUE for rolling up (adding
- * 1), or FALSE for rolling down (subtracting
- * 1).
- *
- * @return bool Returns TRUE on success or FALSE on failure.
- */
- public function roll(#[TypeAware(['8.0' => 'int'], default: '')] $field, $value) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Whether a field is set
- * @link https://secure.php.net/manual/en/intlcalendar.isset.php
- * @param int $field
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time
- * {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}.
- * These are integer values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @return bool Assuming there are no argument errors, returns TRUE iif the field is set.
- */
- public function PS_UNRESERVE_PREFIX_isSet(#[TypeAware(['8.0' => 'int'], default: '')] $field) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Set a time field or several common fields at once
- * @link https://secure.php.net/manual/en/intlcalendar.set.php
- * @param int $year
- * One of the {@link https://secure.php.net/manual/en/class.intlcalendar.php IntlCalendar} date/time {@link https://secure.php.net/manual/en/class.intlcalendar.php#intlcalendar.constants field constants}. These are integer
- * values between 0 and
- * IntlCalendar::FIELD_COUNT.
- *
- * @param int $month
- * The new value for IntlCalendar::FIELD_MONTH.
- *
- * @param int $dayOfMonth [optional]
- * The new value for IntlCalendar::FIELD_DAY_OF_MONTH.
- * The month sequence is zero-based, i.e., January is represented by 0,
- * February by 1, ..., December is 11 and Undecember (if the calendar has
- * it) is 12.
- *
- * @param int $hour [optional]
- *
- * The new value for IntlCalendar::FIELD_HOUR_OF_DAY.
- *
- * @param int $minute [optional]
- *
- * The new value for IntlCalendar::FIELD_MINUTE.
- *
- * @param int $second [optional]
- * The new value for IntlCalendar::FIELD_SECOND.
- *
- * @return bool Returns TRUE on success and FALSE on failure.
- */
- public function set($year, $month, $dayOfMonth = null, $hour = null, $minute = null, $second = null) {}
-
- /**
- * (PHP 5 >= 5.5.0 PECL intl >= 3.0.0a1)
- * Set a time field or several common fields at once
- * @link https://secure.php.net/manual/en/intlcalendar.set.php
- * @param int $field One of the IntlCalendar date/time field constants. These are integer values between 0 and IntlCalendar::FIELD_COUNT.
- * @param int $value The new value of the given field.
- * @return bool Returns TRUE on success and FALSE on failure.
- * @since 5.5
- */
- public function set($field, $value) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Set the day on which the week is deemed to start
- * @link https://secure.php.net/manual/en/intlcalendar.setfirstdayofweek.php
- * @param int $dayOfWeek
- * One of the constants IntlCalendar::DOW_SUNDAY,
- * IntlCalendar::DOW_MONDAY, ...,
- * IntlCalendar::DOW_SATURDAY.
- *
- * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
- */
- public function setFirstDayOfWeek(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Set whether date/time interpretation is to be lenient
- * @link https://secure.php.net/manual/en/intlcalendar.setlenient.php
- * @param bool $lenient
- * Use TRUE to activate the lenient mode; FALSE otherwise.
- *
- * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters.
- */
- public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Set behavior for handling repeating wall times at negative timezone offset transitions
- * @link https://secure.php.net/manual/en/intlcalendar.setrepeatedwalltimeoption.php
- * @param int $option
- * One of the constants IntlCalendar::WALLTIME_FIRST or
- * IntlCalendar::WALLTIME_LAST.
- *
- * @return bool
- * Returns TRUE on success. Failure can only happen due to invalid parameters.
- */
- public function setRepeatedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Set behavior for handling skipped wall times at positive timezone offset transitions
- * @link https://secure.php.net/manual/en/intlcalendar.setskippedwalltimeoption.php
- * @param int $option
- * One of the constants IntlCalendar::WALLTIME_FIRST,
- * IntlCalendar::WALLTIME_LAST or
- * IntlCalendar::WALLTIME_NEXT_VALID.
- *
- * @return bool
- *
- * Returns TRUE on success. Failure can only happen due to invalid parameters.
- *
- */
- public function setSkippedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Set the calendar time in milliseconds since the epoch
- * @link https://secure.php.net/manual/en/intlcalendar.settime.php
- * @param float $timestamp
- * An instant represented by the number of number of milliseconds between
- * such instant and the epoch, ignoring leap seconds.
- *
- * @return bool
- * Returns TRUE on success and FALSE on failure.
- */
- public function setTime(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Set the timezone used by this calendar
- * @link https://secure.php.net/manual/en/intlcalendar.settimezone.php
- * @param mixed $timezone
- * The new timezone to be used by this calendar. It can be specified in the
- * following ways:
- *
- *
- * -
- *
- * NULL, in which case the default timezone will be used, as specified in
- * the ini setting {@link https://secure.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone} or
- * through the function {@link https://secure.php.net/manual/en/function.date-default-timezone-set.php date_default_timezone_set()} and as
- * returned by {@link https://secure.php.net/manual/en/function.date-default-timezone-get.php date_default_timezone_get()}.
- *
- *
- * -
- *
- * An {@link https://secure.php.net/manual/en/class.intltimezone.php IntlTimeZone}, which will be used directly.
- *
- *
- * -
- *
- * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone}. Its identifier will be extracted
- * and an ICU timezone object will be created; the timezone will be backed
- * by ICU's database, not PHP's.
- *
- *
- * -
- *
- * A {@link https://secure.php.net/manual/en/language.types.string.php string}, which should be a valid ICU timezone identifier.
- * See b>IntlTimeZone::createTimeZoneIDEnumeration(). Raw
- * offsets such as "GMT+08:30" are also accepted.
- *
- *
- *
- * @return bool Returns TRUE on success and FALSE on failure.
- */
- public function setTimeZone($timezone) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)
- * Convert an IntlCalendar into a DateTime object
- * @link https://secure.php.net/manual/en/intlcalendar.todatetime.php
- * @return DateTime|false
- * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this
- * object (though using PHP's database instead of ICU's) and the same time,
- * except for the smaller precision (second precision instead of millisecond).
- * Returns FALSE on failure.
- */
- #[Pure]
- public function toDateTime() {}
-
- /**
- * @link https://www.php.net/manual/en/intlcalendar.setminimaldaysinfirstweek.php
- * @param int $days
- * @return bool
- */
- public function setMinimalDaysInFirstWeek(#[TypeAware(['8.0' => 'int'], default: '')] $days) {}
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)
+ * Convert an IntlCalendar into a DateTime object
+ * @link https://secure.php.net/manual/en/intlcalendar.todatetime.php
+ * @return DateTime|false
+ * A {@link https://secure.php.net/manual/en/class.datetime.php DateTime} object with the same timezone as this
+ * object (though using PHP's database instead of ICU's) and the same time,
+ * except for the smaller precision (second precision instead of millisecond).
+ * Returns FALSE on failure.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function toDateTime(): DateTime|false {}
+
+ /**
+ * @link https://www.php.net/manual/en/intlcalendar.setminimaldaysinfirstweek.php
+ * @param int $days
+ * @return bool
+ */
+ public function setMinimalDaysInFirstWeek(#[TypeAware(['8.0' => 'int'], default: '')] $days) {}
}
/**
@@ -3269,15 +3407,20 @@ public function setMinimalDaysInFirstWeek(#[TypeAware(['8.0' => 'int'], default:
*/
class IntlIterator implements Iterator
{
- public function current() {}
+ #[TentativeType]
+ public function current(): mixed {}
- public function key() {}
+ #[TentativeType]
+ public function key(): mixed {}
- public function next() {}
+ #[TentativeType]
+ public function next(): void {}
- public function rewind() {}
+ #[TentativeType]
+ public function rewind(): void {}
- public function valid() {}
+ #[TentativeType]
+ public function valid(): bool {}
}
/**
@@ -3290,270 +3433,294 @@ class IntlException extends Exception {}
*/
class IntlTimeZone
{
- /* Constants */
- public const DISPLAY_SHORT = 1;
- public const DISPLAY_LONG = 2;
- public const DISPLAY_SHORT_GENERIC = 3;
- public const DISPLAY_LONG_GENERIC = 4;
- public const DISPLAY_SHORT_GMT = 5;
- public const DISPLAY_LONG_GMT = 6;
- public const DISPLAY_SHORT_COMMONLY_USED = 7;
- public const DISPLAY_GENERIC_LOCATION = 8;
- public const TYPE_ANY = 0;
- public const TYPE_CANONICAL = 1;
- public const TYPE_CANONICAL_LOCATION = 2;
-
- /* Methods */
-
- private function __construct() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the number of IDs in the equivalency group that includes the given ID
- * @link https://secure.php.net/manual/en/intltimezone.countequivalentids.php
- * @param string $timezoneId
- * @return int|false number of IDs or FALSE on failure
- */
- public static function countEquivalentIDs(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Create a new copy of the default timezone for this host
- * @link https://secure.php.net/manual/en/intltimezone.createdefault.php
- * @return IntlTimeZone
- */
- public static function createDefault() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get an enumeration over time zone IDs associated with the given country or offset
- * @link https://secure.php.net/manual/en/intltimezone.createenumeration.php
- * @param mixed $countryOrRawOffset [optional]
- * @return IntlIterator|false an iterator or FALSE on failure
- */
- public static function createEnumeration($countryOrRawOffset) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Create a timezone object for the given ID
- * @link https://secure.php.net/manual/en/intltimezone.createtimezone.php
- * @param string $timezoneId
- * @return IntlTimeZone|null a timezone object or NULL on failure
- */
- public static function createTimeZone(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get an enumeration over system time zone IDs with the given filter conditions
- * @link https://secure.php.net/manual/en/intltimezone.createtimezoneidenumeration.php
- * @param int $type
- * @param string|null $region [optional]
- * @param int $rawOffset [optional]
- * @return IntlIterator|false an iterator or FALSE on failure
- */
- public static function createTimeZoneIDEnumeration(
- #[TypeAware(['8.0' => 'int'], default: '')] $type,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $region = null,
- #[TypeAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Create a timezone object from DateTimeZone
- * @link https://secure.php.net/manual/en/intltimezone.fromdatetimezone.php
- * @param DateTimeZone $timezone
- * @return IntlTimeZone|null a timezone object or NULL on failure
- */
- public static function fromDateTimeZone(#[TypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID
- * @link https://secure.php.net/manual/en/intltimezone.getcanonicalid.php
- * @param string $timezoneId
- * @param bool &$isSystemId [optional]
- * @return string|false the timezone ID or FALSE on failure
- */
- public static function getCanonicalID(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId, &$isSystemId) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get a name of this time zone suitable for presentation to the user
- * @param bool $dst [optional]
- * @param int $style [optional]
- * @param string $locale [optional]
- * @return string|false the timezone name or FALSE on failure
- */
- #[Pure]
- public function getDisplayName(
- #[TypeAware(['8.0' => 'bool'], default: '')] $dst = false,
- #[TypeAware(['8.0' => 'int'], default: '')] $style = 2,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $locale
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the amount of time to be added to local standard time to get local wall clock time
- * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
- * @return int
- */
- #[Pure]
- public function getDSTSavings() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get an ID in the equivalency group that includes the given ID
- * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
- * @param string $timezoneId
- * @param int $offset
- * @return string|false the time zone ID or FALSE on failure
- */
- public static function getEquivalentID(
- #[TypeAware(['8.0' => 'string'], default: '')] $timezoneId,
- #[TypeAware(['8.0' => 'int'], default: '')] $offset
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get last error code on the object
- * @link https://secure.php.net/manual/en/intltimezone.geterrorcode.php
- * @return int
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get last error message on the object
- * @link https://secure.php.net/manual/en/intltimezone.geterrormessage.php
- * @return string
- */
- #[Pure]
- public function getErrorMessage() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Create GMT (UTC) timezone
- * @link https://secure.php.net/manual/en/intltimezone.getgmt.php
- * @return IntlTimeZone
- */
- public static function getGMT() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get timezone ID
- * @return string
- */
- #[Pure]
- public function getID() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the time zone raw and GMT offset for the given moment in time
- * @link https://secure.php.net/manual/en/intltimezone.getoffset.php
- * @param float $timestamp
- * moment in time for which to return offsets, in units of milliseconds from
- * January 1, 1970 0:00 GMT, either GMT time or local wall time, depending on
- * `local'.
- * @param bool $local
- * if true, `date' is local wall time; otherwise it is in GMT time.
- * @param int &$rawOffset
- * output parameter to receive the raw offset, that is, the offset not
- * including DST adjustments
- * @param int &$dstOffset
- * output parameter to receive the DST offset, that is, the offset to be added
- * to `rawOffset' to obtain the total offset between local and GMT time. If
- * DST is not in effect, this value is zero; otherwise it is a positive value,
- * typically one hour.
- * @return bool boolean indication of success
- */
- public function getOffset(
- #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
- #[TypeAware(['8.0' => 'bool'], default: '')] $local,
- &$rawOffset,
- &$dstOffset
- ) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the raw GMT offset (before taking daylight savings time into account
- * @link https://secure.php.net/manual/en/intltimezone.getrawoffset.php
- * @return int
- */
- #[Pure]
- public function getRawOffset() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the region code associated with the given system time zone ID
- * @link https://secure.php.net/manual/en/intltimezone.getregion.php
- * @param string $timezoneId
- * @return string|false region or FALSE on failure
- */
- public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Get the timezone data version currently used by ICU
- * @link https://secure.php.net/manual/en/intltimezone.gettzdataversion.php
- * @return string
- */
- public static function getTZDataVersion() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the "unknown" time zone
- * @link https://secure.php.net/manual/en/intltimezone.getunknown.php
- * @return IntlTimeZone
- */
- public static function getUnknown() {}
-
- /**
- * (PHP 7 >=7.1.0)
- * Translates a system timezone (e.g. "America/Los_Angeles") into a Windows
- * timezone (e.g. "Pacific Standard Time").
- * @link https://secure.php.net/manual/en/intltimezone.getwindowsid.php
- * @param string $timezoneId
- * @return string|false the Windows timezone or FALSE on failure
- * @since 7.1
- */
- public static function getWindowsID(string $timezoneId) {}
-
- /**
- * @link https://www.php.net/manual/en/intltimezone.getidforwindowsid.php
- * @param string $timezoneId
- * @param string|null $region
- * @return string|false the Windows timezone or FALSE on failure
- * @since 7.1
- */
- public static function getIDForWindowsID(string $timezoneId, ?string $region = null) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Check if this zone has the same rules and offset as another zone
- * @link https://secure.php.net/manual/en/intltimezone.hassamerules.php
- * @param IntlTimeZone $other
- * @return bool
- */
- #[Pure]
- public function hasSameRules(IntlTimeZone $other) {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Convert to DateTimeZone object
- * @link https://secure.php.net/manual/en/intltimezone.todatetimezone.php
- * @return DateTimeZone|false the DateTimeZone object or FALSE on failure
- */
- #[Pure]
- public function toDateTimeZone() {}
-
- /**
- * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * Check if this time zone uses daylight savings time
- * @link https://secure.php.net/manual/en/intltimezone.usedaylighttime.php
- * @return bool
- */
- public function useDaylightTime() {}
+ /* Constants */
+ public const DISPLAY_SHORT = 1;
+ public const DISPLAY_LONG = 2;
+ public const DISPLAY_SHORT_GENERIC = 3;
+ public const DISPLAY_LONG_GENERIC = 4;
+ public const DISPLAY_SHORT_GMT = 5;
+ public const DISPLAY_LONG_GMT = 6;
+ public const DISPLAY_SHORT_COMMONLY_USED = 7;
+ public const DISPLAY_GENERIC_LOCATION = 8;
+ public const TYPE_ANY = 0;
+ public const TYPE_CANONICAL = 1;
+ public const TYPE_CANONICAL_LOCATION = 2;
+
+ /* Methods */
+
+ private function __construct() {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the number of IDs in the equivalency group that includes the given ID
+ * @link https://secure.php.net/manual/en/intltimezone.countequivalentids.php
+ * @param string $timezoneId
+ * @return int|false number of IDs or FALSE on failure
+ */
+ #[TentativeType]
+ public static function countEquivalentIDs(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Create a new copy of the default timezone for this host
+ * @link https://secure.php.net/manual/en/intltimezone.createdefault.php
+ * @return IntlTimeZone
+ */
+ #[TentativeType]
+ public static function createDefault(): IntlTimeZone {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get an enumeration over time zone IDs associated with the given country or offset
+ * @link https://secure.php.net/manual/en/intltimezone.createenumeration.php
+ * @param mixed $countryOrRawOffset [optional]
+ * @return IntlIterator|false an iterator or FALSE on failure
+ */
+ #[TentativeType]
+ public static function createEnumeration($countryOrRawOffset): IntlIterator|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Create a timezone object for the given ID
+ * @link https://secure.php.net/manual/en/intltimezone.createtimezone.php
+ * @param string $timezoneId
+ * @return IntlTimeZone|null a timezone object or NULL on failure
+ */
+ #[TentativeType]
+ public static function createTimeZone(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): ?IntlTimeZone {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get an enumeration over system time zone IDs with the given filter conditions
+ * @link https://secure.php.net/manual/en/intltimezone.createtimezoneidenumeration.php
+ * @param int $type
+ * @param string|null $region [optional]
+ * @param int $rawOffset [optional]
+ * @return IntlIterator|false an iterator or FALSE on failure
+ */
+ #[TentativeType]
+ public static function createTimeZoneIDEnumeration(
+ #[TypeAware(['8.0' => 'int'], default: '')] $type,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $region = null,
+ #[TypeAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0
+ ): IntlIterator|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Create a timezone object from DateTimeZone
+ * @link https://secure.php.net/manual/en/intltimezone.fromdatetimezone.php
+ * @param DateTimeZone $timezone
+ * @return IntlTimeZone|null a timezone object or NULL on failure
+ */
+ #[TentativeType]
+ public static function fromDateTimeZone(#[TypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): ?IntlTimeZone {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID
+ * @link https://secure.php.net/manual/en/intltimezone.getcanonicalid.php
+ * @param string $timezoneId
+ * @param bool &$isSystemId [optional]
+ * @return string|false the timezone ID or FALSE on failure
+ */
+ #[TentativeType]
+ public static function getCanonicalID(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId, &$isSystemId): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get a name of this time zone suitable for presentation to the user
+ * @param bool $dst [optional]
+ * @param int $style [optional]
+ * @param string $locale [optional]
+ * @return string|false the timezone name or FALSE on failure
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDisplayName(
+ #[TypeAware(['8.0' => 'bool'], default: '')] $dst = false,
+ #[TypeAware(['8.0' => 'int'], default: '')] $style = 2,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $locale
+ ): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the amount of time to be added to local standard time to get local wall clock time
+ * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDSTSavings(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get an ID in the equivalency group that includes the given ID
+ * @link https://secure.php.net/manual/en/intltimezone.getequivalentid.php
+ * @param string $timezoneId
+ * @param int $offset
+ * @return string|false the time zone ID or FALSE on failure
+ */
+ #[TentativeType]
+ public static function getEquivalentID(
+ #[TypeAware(['8.0' => 'string'], default: '')] $timezoneId,
+ #[TypeAware(['8.0' => 'int'], default: '')] $offset
+ ): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get last error code on the object
+ * @link https://secure.php.net/manual/en/intltimezone.geterrorcode.php
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get last error message on the object
+ * @link https://secure.php.net/manual/en/intltimezone.geterrormessage.php
+ * @return string|false
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Create GMT (UTC) timezone
+ * @link https://secure.php.net/manual/en/intltimezone.getgmt.php
+ * @return IntlTimeZone
+ */
+ #[TentativeType]
+ public static function getGMT(): IntlTimeZone {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get timezone ID
+ * @return string
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getID(): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the time zone raw and GMT offset for the given moment in time
+ * @link https://secure.php.net/manual/en/intltimezone.getoffset.php
+ * @param float $timestamp
+ * moment in time for which to return offsets, in units of milliseconds from
+ * January 1, 1970 0:00 GMT, either GMT time or local wall time, depending on
+ * `local'.
+ * @param bool $local
+ * if true, `date' is local wall time; otherwise it is in GMT time.
+ * @param int &$rawOffset
+ * output parameter to receive the raw offset, that is, the offset not
+ * including DST adjustments
+ * @param int &$dstOffset
+ * output parameter to receive the DST offset, that is, the offset to be added
+ * to `rawOffset' to obtain the total offset between local and GMT time. If
+ * DST is not in effect, this value is zero; otherwise it is a positive value,
+ * typically one hour.
+ * @return bool boolean indication of success
+ */
+ #[TentativeType]
+ public function getOffset(
+ #[TypeAware(['8.0' => 'float'], default: '')] $timestamp,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $local,
+ &$rawOffset,
+ &$dstOffset
+ ): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the raw GMT offset (before taking daylight savings time into account
+ * @link https://secure.php.net/manual/en/intltimezone.getrawoffset.php
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getRawOffset(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the region code associated with the given system time zone ID
+ * @link https://secure.php.net/manual/en/intltimezone.getregion.php
+ * @param string $timezoneId
+ * @return string|false region or FALSE on failure
+ */
+ #[TentativeType]
+ public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Get the timezone data version currently used by ICU
+ * @link https://secure.php.net/manual/en/intltimezone.gettzdataversion.php
+ * @return string
+ */
+ #[TentativeType]
+ public static function getTZDataVersion(): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the "unknown" time zone
+ * @link https://secure.php.net/manual/en/intltimezone.getunknown.php
+ * @return IntlTimeZone
+ */
+ #[TentativeType]
+ public static function getUnknown(): IntlTimeZone {}
+
+ /**
+ * (PHP 7 >=7.1.0)
+ * Translates a system timezone (e.g. "America/Los_Angeles") into a Windows
+ * timezone (e.g. "Pacific Standard Time").
+ * @link https://secure.php.net/manual/en/intltimezone.getwindowsid.php
+ * @param string $timezoneId
+ * @return string|false the Windows timezone or FALSE on failure
+ * @since 7.1
+ */
+ #[TentativeType]
+ public static function getWindowsID(string $timezoneId): string|false {}
+
+ /**
+ * @link https://www.php.net/manual/en/intltimezone.getidforwindowsid.php
+ * @param string $timezoneId
+ * @param string|null $region
+ * @return string|false the Windows timezone or FALSE on failure
+ * @since 7.1
+ */
+ #[TentativeType]
+ public static function getIDForWindowsID(string $timezoneId, ?string $region = null): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Check if this zone has the same rules and offset as another zone
+ * @link https://secure.php.net/manual/en/intltimezone.hassamerules.php
+ * @param IntlTimeZone $other
+ * @return bool
+ */
+ #[Pure]
+ #[TentativeType]
+ public function hasSameRules(IntlTimeZone $other): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Convert to DateTimeZone object
+ * @link https://secure.php.net/manual/en/intltimezone.todatetimezone.php
+ * @return DateTimeZone|false the DateTimeZone object or FALSE on failure
+ */
+ #[Pure]
+ #[TentativeType]
+ public function toDateTimeZone(): DateTimeZone|false {}
+
+ /**
+ * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
+ * Check if this time zone uses daylight savings time
+ * @link https://secure.php.net/manual/en/intltimezone.usedaylighttime.php
+ * @return bool
+ */
+ #[TentativeType]
+ public function useDaylightTime(): bool {}
}
/**
@@ -6806,329 +6973,354 @@ function intltz_get_id_for_windows_id(string $timezoneId, ?string $region = null
*/
class IntlBreakIterator implements IteratorAggregate
{
- /* Constants */
- public const DONE = -1;
- public const WORD_NONE = 0;
- public const WORD_NONE_LIMIT = 100;
- public const WORD_NUMBER = 100;
- public const WORD_NUMBER_LIMIT = 200;
- public const WORD_LETTER = 200;
- public const WORD_LETTER_LIMIT = 300;
- public const WORD_KANA = 300;
- public const WORD_KANA_LIMIT = 400;
- public const WORD_IDEO = 400;
- public const WORD_IDEO_LIMIT = 500;
- public const LINE_SOFT = 0;
- public const LINE_SOFT_LIMIT = 100;
- public const LINE_HARD = 100;
- public const LINE_HARD_LIMIT = 200;
- public const SENTENCE_TERM = 0;
- public const SENTENCE_TERM_LIMIT = 100;
- public const SENTENCE_SEP = 100;
- public const SENTENCE_SEP_LIMIT = 200;
-
- /* Methods */
- /**
- * (PHP 5 >=5.5.0)
- * Private constructor for disallowing instantiation
- */
- private function __construct() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for boundaries of combining character sequences
- * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php
- * @param string $locale
- * @return IntlBreakIterator
- */
- public static function createCharacterInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for boundaries of code points
- * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php
- * @return IntlBreakIterator
- */
- public static function createCodePointInstance() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for logically possible line breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php
- * @param string $locale [optional]
- * @return IntlBreakIterator
- */
- public static function createLineInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for sentence breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php
- * @param string $locale [optional]
- * @return IntlBreakIterator
- */
- public static function createSentenceInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for title-casing breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php
- * @param string $locale [optional]
- * @return IntlBreakIterator
- */
- public static function createTitleInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for word breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php
- * @param string $locale [optional]
- * @return IntlBreakIterator
- */
- public static function createWordInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get index of current position
- * @link https://secure.php.net/manual/en/intlbreakiterator.current.php
- * @return int
- */
- #[Pure]
- public function current() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Set position to the first character in the text
- * @link https://secure.php.net/manual/en/intlbreakiterator.first.php
- */
- public function first() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Advance the iterator to the first boundary following specified offset
- * @link https://secure.php.net/manual/en/intlbreakiterator.following.php
- * @param int $offset
- */
- public function following(#[TypeAware(['8.0' => 'int'], default: '')] $offset) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get last error code on the object
- * @link https://secure.php.net/manual/en/intlbreakiterator.geterrorcode.php
- * @return int
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get last error message on the object
- * @link https://secure.php.net/manual/en/intlbreakiterator.geterrormessage.php
- * @return string
- */
- #[Pure]
- public function getErrorMessage() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the locale associated with the object
- * @link https://secure.php.net/manual/en/intlbreakiterator.getlocale.php
- * @param string $type
- */
- #[Pure]
- public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create iterator for navigating fragments between boundaries
- * @link https://secure.php.net/manual/en/intlbreakiterator.getpartsiterator.php
- * @param int $type [optional]
- *
- * Optional key type. Possible values are:
- *
- * -
- * {@see IntlPartsIterator::KEY_SEQUENTIAL}
- * - The default. Sequentially increasing integers used as key.
- *
- * -
- * {@see IntlPartsIterator::KEY_LEFT}
- * - Byte offset left of current part used as key.
- *
- * -
- * {@see IntlPartsIterator::KEY_RIGHT}
- * - Byte offset right of current part used as key.
- *
- *
- */
- #[Pure]
- public function getPartsIterator(#[TypeAware(['8.0' => 'string'], default: '')] $type = IntlPartsIterator::KEY_SEQUENTIAL) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the text being scanned
- * @link https://secure.php.net/manual/en/intlbreakiterator.gettext.php
- */
- #[Pure]
- public function getText() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Tell whether an offset is a boundary's offset
- * @link https://secure.php.net/manual/en/intlbreakiterator.isboundary.php
- * @param int $offset
- */
- #[Pure]
- public function isBoundary(#[TypeAware(['8.0' => 'int'], default: '')] $offset) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Set the iterator position to index beyond the last character
- * @link https://secure.php.net/manual/en/intlbreakiterator.last.php
- * @return int
- */
- public function last() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * @link https://secure.php.net/manual/en/intlbreakiterator.next.php
- * @param int $offset [optional]
- * @return int
- */
- public function next(#[TypeAware(['8.0' => 'int|null'], default: '')] $offset = null) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * @link https://secure.php.net/manual/en/intlbreakiterator.preceding.php
- * @param int $offset
- */
- public function preceding(#[TypeAware(['8.0' => 'int'], default: '')] $offset) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Set the iterator position to the boundary immediately before the current
- * @link https://secure.php.net/manual/en/intlbreakiterator.previous.php
- * @return int
- */
- public function previous() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Set the text being scanned
- * @link https://secure.php.net/manual/en/intlbreakiterator.settext.php
- * @param string $text
- */
- public function setText(#[TypeAware(['8.0' => 'string'], default: '')] $text) {}
-
- /**
- * @return Traversable
- */
- #[Pure]
- public function getIterator() {}
+ /* Constants */
+ public const DONE = -1;
+ public const WORD_NONE = 0;
+ public const WORD_NONE_LIMIT = 100;
+ public const WORD_NUMBER = 100;
+ public const WORD_NUMBER_LIMIT = 200;
+ public const WORD_LETTER = 200;
+ public const WORD_LETTER_LIMIT = 300;
+ public const WORD_KANA = 300;
+ public const WORD_KANA_LIMIT = 400;
+ public const WORD_IDEO = 400;
+ public const WORD_IDEO_LIMIT = 500;
+ public const LINE_SOFT = 0;
+ public const LINE_SOFT_LIMIT = 100;
+ public const LINE_HARD = 100;
+ public const LINE_HARD_LIMIT = 200;
+ public const SENTENCE_TERM = 0;
+ public const SENTENCE_TERM_LIMIT = 100;
+ public const SENTENCE_SEP = 100;
+ public const SENTENCE_SEP_LIMIT = 200;
+
+ /* Methods */
+ /**
+ * (PHP 5 >=5.5.0)
+ * Private constructor for disallowing instantiation
+ */
+ private function __construct() {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for boundaries of combining character sequences
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php
+ * @param string $locale
+ * @return IntlBreakIterator
+ */
+ #[TentativeType]
+ public static function createCharacterInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlBreakIterator {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for boundaries of code points
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php
+ * @return IntlCodePointBreakIterator
+ */
+ #[TentativeType]
+ public static function createCodePointInstance(): IntlCodePointBreakIterator {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for logically possible line breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php
+ * @param string $locale [optional]
+ * @return IntlBreakIterator|null
+ */
+ #[TentativeType]
+ public static function createLineInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for sentence breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php
+ * @param string $locale [optional]
+ * @return IntlBreakIterator|null
+ */
+ #[TentativeType]
+ public static function createSentenceInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for title-casing breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php
+ * @param string $locale [optional]
+ * @return IntlBreakIterator|null
+ */
+ #[TentativeType]
+ public static function createTitleInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for word breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php
+ * @param string $locale [optional]
+ * @return IntlBreakIterator|null
+ */
+ #[TentativeType]
+ public static function createWordInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get index of current position
+ * @link https://secure.php.net/manual/en/intlbreakiterator.current.php
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function current(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Set position to the first character in the text
+ * @link https://secure.php.net/manual/en/intlbreakiterator.first.php
+ */
+ #[TentativeType]
+ public function first(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Advance the iterator to the first boundary following specified offset
+ * @link https://secure.php.net/manual/en/intlbreakiterator.following.php
+ * @param int $offset
+ */
+ #[TentativeType]
+ public function following(#[TypeAware(['8.0' => 'int'], default: '')] $offset): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get last error code on the object
+ * @link https://secure.php.net/manual/en/intlbreakiterator.geterrorcode.php
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get last error message on the object
+ * @link https://secure.php.net/manual/en/intlbreakiterator.geterrormessage.php
+ * @return string
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): string {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the locale associated with the object
+ * @link https://secure.php.net/manual/en/intlbreakiterator.getlocale.php
+ * @param string $type
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create iterator for navigating fragments between boundaries
+ * @link https://secure.php.net/manual/en/intlbreakiterator.getpartsiterator.php
+ * @param int $type [optional]
+ *
+ * Optional key type. Possible values are:
+ *
+ * -
+ * {@see IntlPartsIterator::KEY_SEQUENTIAL}
+ * - The default. Sequentially increasing integers used as key.
+ *
+ * -
+ * {@see IntlPartsIterator::KEY_LEFT}
+ * - Byte offset left of current part used as key.
+ *
+ * -
+ * {@see IntlPartsIterator::KEY_RIGHT}
+ * - Byte offset right of current part used as key.
+ *
+ *
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getPartsIterator(#[TypeAware(['8.0' => 'string'], default: '')] $type = IntlPartsIterator::KEY_SEQUENTIAL): IntlPartsIterator {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the text being scanned
+ * @link https://secure.php.net/manual/en/intlbreakiterator.gettext.php
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getText(): ?string {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Tell whether an offset is a boundary's offset
+ * @link https://secure.php.net/manual/en/intlbreakiterator.isboundary.php
+ * @param int $offset
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isBoundary(#[TypeAware(['8.0' => 'int'], default: '')] $offset): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Set the iterator position to index beyond the last character
+ * @link https://secure.php.net/manual/en/intlbreakiterator.last.php
+ * @return int
+ */
+ #[TentativeType]
+ public function last(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * @link https://secure.php.net/manual/en/intlbreakiterator.next.php
+ * @param int $offset [optional]
+ * @return int
+ */
+ #[TentativeType]
+ public function next(#[TypeAware(['8.0' => 'int|null'], default: '')] $offset = null): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * @link https://secure.php.net/manual/en/intlbreakiterator.preceding.php
+ * @param int $offset
+ */
+ #[TentativeType]
+ public function preceding(#[TypeAware(['8.0' => 'int'], default: '')] $offset): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Set the iterator position to the boundary immediately before the current
+ * @link https://secure.php.net/manual/en/intlbreakiterator.previous.php
+ * @return int
+ */
+ #[TentativeType]
+ public function previous(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Set the text being scanned
+ * @link https://secure.php.net/manual/en/intlbreakiterator.settext.php
+ * @param string $text
+ */
+ #[TentativeType]
+ public function setText(#[TypeAware(['8.0' => 'string'], default: '')] $text): ?bool {}
+
+ /**
+ * @since 8.0
+ * @return Iterator
+ */
+ #[Pure]
+ public function getIterator(): Iterator {}
}
class IntlRuleBasedBreakIterator extends IntlBreakIterator implements Traversable
{
- /* Methods */
- /**
- * (PHP 5 >=5.5.0)
- * @link https://secure.php.net/manual/en/intlbreakiterator.construct.php
- * @param string $rules
- * @param string $compiled [optional]
- */
- #[Pure]
- public function __construct(
- #[TypeAware(['8.0' => 'string'], default: '')] $rules,
- #[TypeAware(['8.0' => 'bool'], default: '')] $compiled = false
- ) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for boundaries of combining character sequences
- * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php
- * @param string $locale
- * @return IntlRuleBasedBreakIterator
- */
- public static function createCharacterInstance($locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for boundaries of code points
- * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php
- * @return IntlRuleBasedBreakIterator
- */
- public static function createCodePointInstance() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for logically possible line breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php
- * @param string $locale [optional]
- * @return IntlRuleBasedBreakIterator
- */
- public static function createLineInstance($locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for sentence breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php
- * @param string $locale [optional]
- * @return IntlRuleBasedBreakIterator
- */
- public static function createSentenceInstance($locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for title-casing breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php
- * @param string $locale [optional]
- * @return IntlRuleBasedBreakIterator
- */
- public static function createTitleInstance($locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Create break iterator for word breaks
- * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php
- * @param string $locale [optional]
- * @return IntlRuleBasedBreakIterator
- */
- public static function createWordInstance($locale) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getbinaryrules.php
- * Get the binary form of compiled rules
- * @return string
- */
- #[Pure]
- public function getBinaryRules() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrules.php
- * Get the rule set used to create this object
- * @return string
- */
- #[Pure]
- public function getRules() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulesstatus.php
- * Get the largest status value from the break rules that determined the current break position
- * @return int
- */
- #[Pure]
- public function getRuleStatus() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulestatusvec.php
- * Get the status values from the break rules that determined the current break position
- * @return array
- */
- #[Pure]
- public function getRuleStatusVec() {}
+ /* Methods */
+ /**
+ * (PHP 5 >=5.5.0)
+ * @link https://secure.php.net/manual/en/intlbreakiterator.construct.php
+ * @param string $rules
+ * @param string $compiled [optional]
+ */
+ #[Pure]
+ public function __construct(
+ #[TypeAware(['8.0' => 'string'], default: '')] $rules,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $compiled = false
+ ) {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for boundaries of combining character sequences
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createcharacterinstance.php
+ * @param string $locale
+ * @return IntlRuleBasedBreakIterator
+ */
+ public static function createCharacterInstance($locale) {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for boundaries of code points
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createcodepointinstance.php
+ * @return IntlRuleBasedBreakIterator
+ */
+ public static function createCodePointInstance() {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for logically possible line breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createlineinstance.php
+ * @param string $locale [optional]
+ * @return IntlRuleBasedBreakIterator
+ */
+ public static function createLineInstance($locale) {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for sentence breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createsentenceinstance.php
+ * @param string $locale [optional]
+ * @return IntlRuleBasedBreakIterator
+ */
+ public static function createSentenceInstance($locale) {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for title-casing breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createtitleinstance.php
+ * @param string $locale [optional]
+ * @return IntlRuleBasedBreakIterator
+ */
+ public static function createTitleInstance($locale) {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create break iterator for word breaks
+ * @link https://secure.php.net/manual/en/intlbreakiterator.createwordinstance.php
+ * @param string $locale [optional]
+ * @return IntlRuleBasedBreakIterator
+ */
+ public static function createWordInstance($locale) {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getbinaryrules.php
+ * Get the binary form of compiled rules
+ * @return string
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getBinaryRules(): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrules.php
+ * Get the rule set used to create this object
+ * @return string|false
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getRules(): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulesstatus.php
+ * Get the largest status value from the break rules that determined the current break position
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getRuleStatus(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * @link https://secure.php.net/manual/en/intlrulebasedbreakiterator.getrulestatusvec.php
+ * Get the status values from the break rules that determined the current break position
+ * @return array|false
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getRuleStatusVec(): array|false {}
}
/**
@@ -7137,282 +7329,303 @@ public function getRuleStatusVec() {}
*/
class IntlPartsIterator extends IntlIterator implements Iterator
{
- public const KEY_SEQUENTIAL = 0;
- public const KEY_LEFT = 1;
- public const KEY_RIGHT = 2;
+ public const KEY_SEQUENTIAL = 0;
+ public const KEY_LEFT = 1;
+ public const KEY_RIGHT = 2;
- /**
- * @return IntlBreakIterator
- */
- #[Pure]
- public function getBreakIterator() {}
+ /**
+ * @return IntlBreakIterator
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getBreakIterator(): IntlBreakIterator {}
/**
* @since 8.1
*/
- public function getRuleStatus() {}
+ #[TentativeType]
+ public function getRuleStatus(): int {}
}
class IntlCodePointBreakIterator extends IntlBreakIterator implements Traversable
{
- /**
- * (PHP 5 >=5.5.0)
- * Get last code point passed over after advancing or receding the iterator
- * @link https://secure.php.net/manual/en/intlcodepointbreakiterator.getlastcodepoint.php
- * @return int
- */
- #[Pure]
- public function getLastCodePoint() {}
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get last code point passed over after advancing or receding the iterator
+ * @link https://secure.php.net/manual/en/intlcodepointbreakiterator.getlastcodepoint.php
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getLastCodePoint(): int {}
}
class UConverter
{
- /* Constants */
- public const REASON_UNASSIGNED = 0;
- public const REASON_ILLEGAL = 1;
- public const REASON_IRREGULAR = 2;
- public const REASON_RESET = 3;
- public const REASON_CLOSE = 4;
- public const REASON_CLONE = 5;
- public const UNSUPPORTED_CONVERTER = -1;
- public const SBCS = 0;
- public const DBCS = 1;
- public const MBCS = 2;
- public const LATIN_1 = 3;
- public const UTF8 = 4;
- public const UTF16_BigEndian = 5;
- public const UTF16_LittleEndian = 6;
- public const UTF32_BigEndian = 7;
- public const UTF32_LittleEndian = 8;
- public const EBCDIC_STATEFUL = 9;
- public const ISO_2022 = 10;
- public const LMBCS_1 = 11;
- public const LMBCS_2 = 12;
- public const LMBCS_3 = 13;
- public const LMBCS_4 = 14;
- public const LMBCS_5 = 15;
- public const LMBCS_6 = 16;
- public const LMBCS_8 = 17;
- public const LMBCS_11 = 18;
- public const LMBCS_16 = 19;
- public const LMBCS_17 = 20;
- public const LMBCS_18 = 21;
- public const LMBCS_19 = 22;
- public const LMBCS_LAST = 22;
- public const HZ = 23;
- public const SCSU = 24;
- public const ISCII = 25;
- public const US_ASCII = 26;
- public const UTF7 = 27;
- public const BOCU1 = 28;
- public const UTF16 = 29;
- public const UTF32 = 30;
- public const CESU8 = 31;
- public const IMAP_MAILBOX = 32;
-
- /* Methods */
- /**
- * (PHP 5 >=5.5.0)
- * Create UConverter object
- * @link https://php.net/manual/en/uconverter.construct.php
- * @param string $destination_encoding
- * @param string $source_encoding
- */
- #[Pure]
- public function __construct(
- #[TypeAware(['8.0' => 'string|null'], default: '')] $destination_encoding = null,
- #[TypeAware(['8.0' => 'string|null'], default: '')] $source_encoding = null
- ) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Convert string from one charset to anothe
- * @link https://php.net/manual/en/uconverter.convert.php
- * @param string $str
- * @param bool $reverse [optional]
- * @return string
- */
- #[Pure]
- public function convert(
- #[TypeAware(['8.0' => 'string'], default: '')] $str,
- #[TypeAware(['8.0' => 'bool'], default: '')] $reverse = false
- ) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Default "from" callback function
- * @link https://php.net/manual/en/uconverter.fromucallback.php
- * @param int $reason
- * @param string $source
- * @param string $codePoint
- * @param int &$error
- * @return mixed
- */
- public function fromUCallback(
- #[TypeAware(['8.0' => 'int'], default: '')] $reason,
- #[TypeAware(['8.0' => 'array'], default: '')] $source,
- #[TypeAware(['8.0' => 'int'], default: '')] $codePoint,
- &$error
- ) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the aliases of the given name
- * @link https://php.net/manual/en/uconverter.getaliases.php
- * @param string $name
- * @return array
- */
- public static function getAliases(#[TypeAware(['8.0' => 'string'], default: '')] $name = null) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the available canonical converter names
- * @link https://php.net/manual/en/uconverter.getavailable.php
- * @return array
- */
- public static function getAvailable() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the destination encoding
- * @link https://php.net/manual/en/uconverter.getdestinationencoding.php
- * @return string
- */
- #[Pure]
- public function getDestinationEncoding() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the destination converter type
- * @link https://php.net/manual/en/uconverter.getdestinationtype.php
- * @return int
- */
- #[Pure]
- public function getDestinationType() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get last error code on the object
- * @link https://php.net/manual/en/uconverter.geterrorcode.php
- * @return int
- */
- #[Pure]
- public function getErrorCode() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get last error message on the object
- * @link https://php.net/manual/en/uconverter.geterrormessage.php
- * @return string
- */
- #[Pure]
- public function getErrorMessage() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the source encoding
- * @link https://php.net/manual/en/uconverter.getsourceencoding.php
- * @return string
- */
- #[Pure]
- public function getSourceEncoding() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get the source convertor type
- * @link https://php.net/manual/en/uconverter.getsourcetype.php
- * @return int
- */
- #[Pure]
- public function getSourceType() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get standards associated to converter names
- * @link https://php.net/manual/en/uconverter.getstandards.php
- * @return array
- */
- #[Pure]
- public static function getStandards() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get substitution chars
- * @link https://php.net/manual/en/uconverter.getsubstchars.php
- * @return string
- */
- #[Pure]
- public function getSubstChars() {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Get string representation of the callback reason
- * @link https://php.net/manual/en/uconverter.reasontext.php
- * @param int $reason
- * @return string
- */
- #[Pure]
- public static function reasonText(#[TypeAware(['8.0' => 'int'], default: '')] $reason = 0) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Set the destination encoding
- * @link https://php.net/manual/en/uconverter.setdestinationencoding.php
- * @param string $encoding
- * @return void
- */
- public function setDestinationEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Set the source encoding
- * @link https://php.net/manual/en/uconverter.setsourceencoding.php
- * @param string $encoding
- * @return void
- */
- public function setSourceEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Set the substitution chars
- * @link https://php.net/manual/en/uconverter.setsubstchars.php
- * @param string $chars
- * @return void
- */
- public function setSubstChars(#[TypeAware(['8.0' => 'string'], default: '')] $chars) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Default "to" callback function
- * @link https://php.net/manual/en/uconverter.toucallback.php
- * @param int $reason
- * @param string $source
- * @param string $codeUnits
- * @param int &$error
- * @return mixed
- */
- public function toUCallback(
- #[TypeAware(['8.0' => 'int'], default: '')] $reason,
- #[TypeAware(['8.0' => 'string'], default: '')] $source,
- #[TypeAware(['8.0' => 'string'], default: '')] $codeUnits,
- &$error
- ) {}
-
- /**
- * (PHP 5 >=5.5.0)
- * Convert string from one charset to another
- * @link https://php.net/manual/en/uconverter.transcode.php
- * @param string $str
- * @param string $toEncoding
- * @param string $fromEncoding
- * @param array $options
- * @return string
- */
- public static function transcode(
- #[TypeAware(['8.0' => 'string'], default: '')] $str,
- #[TypeAware(['8.0' => 'string'], default: '')] $toEncoding,
- #[TypeAware(['8.0' => 'string'], default: '')] $fromEncoding,
- ?array $options = []
- ) {}
+ /* Constants */
+ public const REASON_UNASSIGNED = 0;
+ public const REASON_ILLEGAL = 1;
+ public const REASON_IRREGULAR = 2;
+ public const REASON_RESET = 3;
+ public const REASON_CLOSE = 4;
+ public const REASON_CLONE = 5;
+ public const UNSUPPORTED_CONVERTER = -1;
+ public const SBCS = 0;
+ public const DBCS = 1;
+ public const MBCS = 2;
+ public const LATIN_1 = 3;
+ public const UTF8 = 4;
+ public const UTF16_BigEndian = 5;
+ public const UTF16_LittleEndian = 6;
+ public const UTF32_BigEndian = 7;
+ public const UTF32_LittleEndian = 8;
+ public const EBCDIC_STATEFUL = 9;
+ public const ISO_2022 = 10;
+ public const LMBCS_1 = 11;
+ public const LMBCS_2 = 12;
+ public const LMBCS_3 = 13;
+ public const LMBCS_4 = 14;
+ public const LMBCS_5 = 15;
+ public const LMBCS_6 = 16;
+ public const LMBCS_8 = 17;
+ public const LMBCS_11 = 18;
+ public const LMBCS_16 = 19;
+ public const LMBCS_17 = 20;
+ public const LMBCS_18 = 21;
+ public const LMBCS_19 = 22;
+ public const LMBCS_LAST = 22;
+ public const HZ = 23;
+ public const SCSU = 24;
+ public const ISCII = 25;
+ public const US_ASCII = 26;
+ public const UTF7 = 27;
+ public const BOCU1 = 28;
+ public const UTF16 = 29;
+ public const UTF32 = 30;
+ public const CESU8 = 31;
+ public const IMAP_MAILBOX = 32;
+
+ /* Methods */
+ /**
+ * (PHP 5 >=5.5.0)
+ * Create UConverter object
+ * @link https://php.net/manual/en/uconverter.construct.php
+ * @param string $destination_encoding
+ * @param string $source_encoding
+ */
+ #[Pure]
+ public function __construct(
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $destination_encoding = null,
+ #[TypeAware(['8.0' => 'string|null'], default: '')] $source_encoding = null
+ ) {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Convert string from one charset to anothe
+ * @link https://php.net/manual/en/uconverter.convert.php
+ * @param string $str
+ * @param bool $reverse [optional]
+ * @return string|false
+ */
+ #[Pure]
+ #[TentativeType]
+ public function convert(
+ #[TypeAware(['8.0' => 'string'], default: '')] $str,
+ #[TypeAware(['8.0' => 'bool'], default: '')] $reverse = false
+ ): string|false {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Default "from" callback function
+ * @link https://php.net/manual/en/uconverter.fromucallback.php
+ * @param int $reason
+ * @param string $source
+ * @param string $codePoint
+ * @param int &$error
+ * @return array|string|int|null
+ */
+ #[TentativeType]
+ public function fromUCallback(
+ #[TypeAware(['8.0' => 'int'], default: '')] $reason,
+ #[TypeAware(['8.0' => 'array'], default: '')] $source,
+ #[TypeAware(['8.0' => 'int'], default: '')] $codePoint,
+ &$error
+ ): array|string|int|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the aliases of the given name
+ * @link https://php.net/manual/en/uconverter.getaliases.php
+ * @param string $name
+ * @return array|false|null
+ */
+ #[TentativeType]
+ public static function getAliases(#[TypeAware(['8.0' => 'string'], default: '')] $name = null): array|false|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the available canonical converter names
+ * @link https://php.net/manual/en/uconverter.getavailable.php
+ * @return array
+ */
+ #[TentativeType]
+ public static function getAvailable(): array {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the destination encoding
+ * @link https://php.net/manual/en/uconverter.getdestinationencoding.php
+ * @return string|false|null
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDestinationEncoding(): string|false|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the destination converter type
+ * @link https://php.net/manual/en/uconverter.getdestinationtype.php
+ * @return int|false|null
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDestinationType(): int|false|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get last error code on the object
+ * @link https://php.net/manual/en/uconverter.geterrorcode.php
+ * @return int
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorCode(): int {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get last error message on the object
+ * @link https://php.net/manual/en/uconverter.geterrormessage.php
+ * @return string|null
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getErrorMessage(): ?string {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the source encoding
+ * @link https://php.net/manual/en/uconverter.getsourceencoding.php
+ * @return string|false|null
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getSourceEncoding(): string|false|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get the source convertor type
+ * @link https://php.net/manual/en/uconverter.getsourcetype.php
+ * @return int|false|null
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getSourceType(): int|false|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get standards associated to converter names
+ * @link https://php.net/manual/en/uconverter.getstandards.php
+ * @return array|null
+ */
+ #[Pure]
+ #[TentativeType]
+ public static function getStandards(): ?array {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get substitution chars
+ * @link https://php.net/manual/en/uconverter.getsubstchars.php
+ * @return string|false|null
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getSubstChars(): string|false|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Get string representation of the callback reason
+ * @link https://php.net/manual/en/uconverter.reasontext.php
+ * @param int $reason
+ * @return string
+ */
+ #[Pure]
+ #[TentativeType]
+ public static function reasonText(#[TypeAware(['8.0' => 'int'], default: '')] $reason = 0): string {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Set the destination encoding
+ * @link https://php.net/manual/en/uconverter.setdestinationencoding.php
+ * @param string $encoding
+ * @return bool
+ */
+ #[TentativeType]
+ public function setDestinationEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Set the source encoding
+ * @link https://php.net/manual/en/uconverter.setsourceencoding.php
+ * @param string $encoding
+ * @return bool
+ */
+ #[TentativeType]
+ public function setSourceEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Set the substitution chars
+ * @link https://php.net/manual/en/uconverter.setsubstchars.php
+ * @param string $chars
+ * @return bool
+ */
+ #[TentativeType]
+ public function setSubstChars(#[TypeAware(['8.0' => 'string'], default: '')] $chars): bool {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Default "to" callback function
+ * @link https://php.net/manual/en/uconverter.toucallback.php
+ * @param int $reason
+ * @param string $source
+ * @param string $codeUnits
+ * @param int &$error
+ * @return array|string|int|null
+ */
+ #[TentativeType]
+ public function toUCallback(
+ #[TypeAware(['8.0' => 'int'], default: '')] $reason,
+ #[TypeAware(['8.0' => 'string'], default: '')] $source,
+ #[TypeAware(['8.0' => 'string'], default: '')] $codeUnits,
+ &$error
+ ): array|string|int|null {}
+
+ /**
+ * (PHP 5 >=5.5.0)
+ * Convert string from one charset to another
+ * @link https://php.net/manual/en/uconverter.transcode.php
+ * @param string $str
+ * @param string $toEncoding
+ * @param string $fromEncoding
+ * @param array $options
+ * @return string|false
+ */
+ #[TentativeType]
+ public static function transcode(
+ #[TypeAware(['8.0' => 'string'], default: '')] $str,
+ #[TypeAware(['8.0' => 'string'], default: '')] $toEncoding,
+ #[TypeAware(['8.0' => 'string'], default: '')] $fromEncoding,
+ ?array $options = []
+ ): string|false {}
}
// End of intl v.1.1.0
diff --git a/json/json.php b/json/json.php
index af706a45f..779b77e10 100644
--- a/json/json.php
+++ b/json/json.php
@@ -1,7 +1,7 @@
'mixed'], default: '')]
- public function jsonSerialize();
+ #[TentativeType]
+ public function jsonSerialize(): mixed;
}
class JsonIncrementalParser
@@ -457,6 +457,6 @@ function json_last_error_msg(): string {}
* @since 7.3
* @link https://wiki.php.net/rfc/json_throw_on_error
*/
-class JsonException extends \Exception {}
+class JsonException extends Exception {}
// End of json v.1.3.1
diff --git a/meta/attributes/internal/TentativeType.php b/meta/attributes/internal/TentativeType.php
new file mode 100644
index 000000000..8bdab771f
--- /dev/null
+++ b/meta/attributes/internal/TentativeType.php
@@ -0,0 +1,13 @@
+
* @return bool true on success or false on failure.
*/
- public function autocommit(bool $enable) {}
+ #[TentativeType]
+ public function autocommit(bool $enable): bool {}
/**
* Starts a transaction
@@ -204,10 +206,11 @@ public function autocommit(bool $enable) {}
* @return bool true on success or false on failure.
* @since 5.5
*/
+ #[TentativeType]
public function begin_transaction(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
- ) {}
+ ): bool {}
/**
* Changes the user of the specified database connection
@@ -228,14 +231,16 @@ public function begin_transaction(
*
* @return bool true on success or false on failure.
*/
- public function change_user(string $username, string $password, ?string $database) {}
+ #[TentativeType]
+ public function change_user(string $username, string $password, ?string $database): bool {}
/**
* Returns the default character set for the database connection
* @link https://php.net/manual/en/mysqli.character-set-name.php
* @return string The default character set for the current connection
*/
- public function character_set_name() {}
+ #[TentativeType]
+ public function character_set_name(): string {}
/**
* @removed 5.4
@@ -257,7 +262,8 @@ public function close() {}
* @param string $name If provided then COMMIT $name is executed.
* @return bool true on success or false on failure.
*/
- public function commit(int $flags = -1, ?string $name = null) {}
+ #[TentativeType]
+ public function commit(int $flags = -1, ?string $name = null): bool {}
/**
* @link https://php.net/manual/en/function.mysqli-connect.php
@@ -268,6 +274,7 @@ public function commit(int $flags = -1, ?string $name = null) {}
* @param int $port [optional]
* @param string $socket [optional]
*/
+ #[TentativeType]
public function connect(
?string $hostname = null,
?string $username = null,
@@ -275,14 +282,15 @@ public function connect(
?string $database = null,
?int $port = null,
?string $socket = null
- ) {}
+ ): bool {}
/**
* Dump debugging information into the log
* @link https://php.net/manual/en/mysqli.dump-debug-info.php
* @return bool true on success or false on failure.
*/
- public function dump_debug_info() {}
+ #[TentativeType]
+ public function dump_debug_info(): bool {}
/**
* Performs debugging operations
@@ -297,7 +305,7 @@ public function debug(string $options) {}
/**
* Returns a character set object
* @link https://php.net/manual/en/mysqli.get-charset.php
- * @return object The function returns a character set object with the following properties:
+ * @return object|null The function returns a character set object with the following properties:
* charset
* Character set name
* collation
@@ -313,35 +321,40 @@ public function debug(string $options) {}
* state
* Character set status (?)
*/
- public function get_charset() {}
+ #[TentativeType]
+ public function get_charset(): ?object {}
/**
* Returns the MySQL client version as a string
* @link https://php.net/manual/en/mysqli.get-client-info.php
* @return string A string that represents the MySQL client library version
*/
- public function get_client_info() {}
+ #[TentativeType]
+ public function get_client_info(): string {}
/**
* Returns statistics about the client connection
* @link https://php.net/manual/en/mysqli.get-connection-stats.php
* @return array|false an array with connection stats if success, false otherwise.
*/
- public function get_connection_stats() {}
+ #[TentativeType]
+ public function get_connection_stats(): array {}
/**
* An undocumented function equivalent to the $server_info property
* @link https://php.net/manual/en/mysqli.get-server-info.php
* @return string A character string representing the server version.
*/
- public function get_server_info() {}
+ #[TentativeType]
+ public function get_server_info(): string {}
/**
* Get result of SHOW WARNINGS
* @link https://php.net/manual/en/mysqli.get-warnings.php
- * @return mysqli_warning
+ * @return mysqli_warning|false
*/
- public function get_warnings() {}
+ #[TentativeType]
+ public function get_warnings(): mysqli_warning|false {}
/**
* Initializes MySQLi and returns a resource for use with mysqli_real_connect()
@@ -357,7 +370,8 @@ public function init() {}
* @param int $process_id
* @return bool true on success or false on failure.
*/
- public function kill(int $process_id) {}
+ #[TentativeType]
+ public function kill(int $process_id): bool {}
/**
* Performs a query on the database
@@ -372,7 +386,8 @@ public function kill(int $process_id) {}
* To retrieve subsequent errors from other statements you have to call
* mysqli_next_result first.
*/
- public function multi_query(string $query) {}
+ #[TentativeType]
+ public function multi_query(string $query): bool {}
/**
* @link https://php.net/manual/en/mysqli.construct.php
@@ -392,14 +407,16 @@ public function mysqli($host = null, $username = null, $password = null, $databa
* @link https://php.net/manual/en/mysqli.more-results.php
* @return bool true on success or false on failure.
*/
- public function more_results() {}
+ #[TentativeType]
+ public function more_results(): bool {}
/**
* Prepare next result from multi_query
* @link https://php.net/manual/en/mysqli.next-result.php
* @return bool true on success or false on failure.
*/
- public function next_result() {}
+ #[TentativeType]
+ public function next_result(): bool {}
/**
* Set options
@@ -450,14 +467,16 @@ public function next_result() {}
*
* @return bool true on success or false on failure.
*/
- public function options(int $option, $value) {}
+ #[TentativeType]
+ public function options(int $option, $value): bool {}
/**
* Pings a server connection, or tries to reconnect if the connection has gone down
* @link https://php.net/manual/en/mysqli.ping.php
* @return bool true on success or false on failure.
*/
- public function ping() {}
+ #[TentativeType]
+ public function ping(): bool {}
/**
* Prepare an SQL statement for execution
@@ -495,7 +514,8 @@ public function ping() {}
*
* @return mysqli_stmt|false mysqli_prepare returns a statement object or false if an error occurred.
*/
- public function prepare(string $query) {}
+ #[TentativeType]
+ public function prepare(string $query): mysqli_stmt|false {}
/**
* Performs a query on the database
@@ -527,7 +547,8 @@ public function prepare(string $query) {}
* a mysqli_result object. For other successful queries mysqli_query will
* return true and false on failure.
*/
- public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT) {}
+ #[TentativeType]
+ public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool {}
/**
* Opens a connection to a mysql server
@@ -605,6 +626,7 @@ public function query(string $query, int $result_mode = MYSQLI_STORE_RESULT) {}
*
* @return bool true on success or false on failure.
*/
+ #[TentativeType]
public function real_connect(
?string $hostname = null,
?string $username = null,
@@ -613,7 +635,7 @@ public function real_connect(
?int $port = null,
?string $socket = null,
int $flags = null
- ) {}
+ ): bool {}
/**
* Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
@@ -627,7 +649,8 @@ public function real_connect(
*
* @return string an escaped string.
*/
- public function real_escape_string(string $string) {}
+ #[TentativeType]
+ public function real_escape_string(string $string): string {}
/**
* Poll connections
@@ -646,14 +669,16 @@ public function real_escape_string(string $string) {}
*
* @return int|false number of ready connections in success, false otherwise.
*/
- public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0) {}
+ #[TentativeType]
+ public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}
/**
* Get result from async query
* @link https://php.net/manual/en/mysqli.reap-async-query.php
* @return mysqli_result|false mysqli_result in success, false otherwise.
*/
- public function reap_async_query() {}
+ #[TentativeType]
+ public function reap_async_query(): mysqli_result|bool {}
/**
* Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
@@ -662,7 +687,8 @@ public function reap_async_query() {}
* @return string
* @link https://secure.php.net/manual/en/mysqli.real-escape-string.php
*/
- public function escape_string(string $string) {}
+ #[TentativeType]
+ public function escape_string(string $string): string {}
/**
* Execute an SQL query
@@ -675,7 +701,8 @@ public function escape_string(string $string) {}
*
* @return bool true on success or false on failure.
*/
- public function real_query(string $query) {}
+ #[TentativeType]
+ public function real_query(string $query): bool {}
/**
* Execute an SQL query
@@ -684,7 +711,8 @@ public function real_query(string $query) {}
* @return bool Returns TRUE on success or FALSE on failure.
* @since 5.5
*/
- public function release_savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
+ #[TentativeType]
+ public function release_savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
/**
* Rolls back current transaction
@@ -694,10 +722,11 @@ public function release_savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'],
* @return bool true on success or false on failure.
* @since 5.5 Added flags and name parameters.
*/
+ #[TentativeType]
public function rollback(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
- ) {}
+ ): bool {}
/**
* Set a named transaction savepoint
@@ -706,7 +735,8 @@ public function rollback(
* @return bool Returns TRUE on success or FALSE on failure.
* @since 5.5
*/
- public function savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {}
+ #[TentativeType]
+ public function savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
/**
* Selects the default database for database queries
@@ -716,7 +746,8 @@ public function savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default:
*
* @return bool true on success or false on failure.
*/
- public function select_db(string $database) {}
+ #[TentativeType]
+ public function select_db(string $database): bool {}
/**
* Sets the default client character set
@@ -726,14 +757,16 @@ public function select_db(string $database) {}
*
* @return bool true on success or false on failure..5
*/
- public function set_charset(string $charset) {}
+ #[TentativeType]
+ public function set_charset(string $charset): bool {}
/**
* @link https://php.net/manual/en/function.mysqli-set-opt
- * @param int $option
+ * @param int $option
* @param mixed $value
*/
- public function set_opt(int $option, $value) {}
+ #[TentativeType]
+ public function set_opt(int $option, $value): bool {}
/**
* Used for establishing secure connections using SSL
@@ -762,14 +795,16 @@ public function ssl_set(?string $key, ?string $certificate, ?string $ca_certific
* @link https://php.net/manual/en/mysqli.stat.php
* @return string|false A string describing the server status. false if an error occurred.
*/
- public function stat() {}
+ #[TentativeType]
+ public function stat(): string|false {}
/**
* Initializes a statement and returns an object for use with mysqli_stmt_prepare
* @link https://php.net/manual/en/mysqli.stmt-init.php
* @return mysqli_stmt an object.
*/
- public function stmt_init() {}
+ #[TentativeType]
+ public function stmt_init(): mysqli_stmt|false {}
/**
* Transfers a result set from the last query
@@ -791,21 +826,24 @@ public function stmt_init() {}
* mysqli_field_count returns a non-zero value, the
* statement should have produced a non-empty result set.
*/
- public function store_result(int $mode = null) {}
+ #[TentativeType]
+ public function store_result(int $mode = null): mysqli_result|false {}
/**
* Returns whether thread safety is given or not
* @link https://php.net/manual/en/mysqli.thread-safe.php
* @return bool true if the client library is thread-safe, otherwise false.
*/
- public function thread_safe() {}
+ #[TentativeType]
+ public function thread_safe(): bool {}
/**
* Initiate a result set retrieval
* @link https://php.net/manual/en/mysqli.use-result.php
* @return mysqli_result|false an unbuffered result object or false if an error occurred.
*/
- public function use_result() {}
+ #[TentativeType]
+ public function use_result(): mysqli_result|false {}
/**
* @link https://php.net/manual/en/mysqli.refresh
@@ -813,7 +851,8 @@ public function use_result() {}
* @return bool TRUE if the refresh was a success, otherwise FALSE
* @since 5.3
*/
- public function refresh(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {}
+ #[TentativeType]
+ public function refresh(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): bool {}
}
/**
@@ -857,7 +896,7 @@ protected function __construct() {}
* @link https://php.net/manual/en/mysqli-warning.next.php
* @return bool True if it successfully moved to the next warning
*/
- public function next() {}
+ public function next(): bool {}
}
/**
@@ -908,14 +947,16 @@ public function __construct(
* @return void
* @link https://php.net/manual/en/mysqli-result.free.php
*/
- public function close() {}
+ #[TentativeType]
+ public function close(): void {}
/**
* Frees the memory associated with a result
* @link https://php.net/manual/en/mysqli-result.free.php
* @return void
*/
- public function free() {}
+ #[TentativeType]
+ public function free(): void {}
/**
* Adjusts the result pointer to an arbitrary row in the result
@@ -926,7 +967,8 @@ public function free() {}
*
* @return bool true on success or false on failure.
*/
- public function data_seek(int $offset) {}
+ #[TentativeType]
+ public function data_seek(int $offset): bool {}
/**
* Returns the next field in the result set
@@ -995,7 +1037,8 @@ public function data_seek(int $offset) {}
*
*