intelephense

1.14.41.16.1
lib/stub/standard/standard_3.php
lib/stub/standard/standard_3.php
+11−4
Index: package/lib/stub/standard/standard_3.php
===================================================================
--- package/lib/stub/standard/standard_3.php
+++ package/lib/stub/standard/standard_3.php
@@ -131,9 +131,14 @@
  * </p>
  * @return float The rounded value
  */
 #[Pure]
-function round(int|float $num, int $precision = 0, #[LanguageLevelTypeAware(['8.4' => 'RoundingMode|int'], default: 'int')] $mode = 0): float {}
+function round(
+    int|float $num,
+    int $precision = 0,
+    #[StubsElementAvailable(from: '5.3', to: '8.4')] #[LanguageLevelTypeAware(['8.4' => 'RoundingMode|int'], default: 'int')] $mode = 0,
+    #[StubsElementAvailable(from: '8.5')] RoundingMode|int $mode = \RoundingMode::HalfAwayFromZero
+): float {}
 
 /**
  * Sine
  * @link https://php.net/manual/en/function.sin.php
@@ -793,11 +798,13 @@
  * For example, an longopts element "opt" recognizes an
  * option --opt.
  * Prior to PHP5.3.0 this parameter was only available on few systems
  * @param int &$rest_index [optional] If the optind parameter is present, then the index where argument parsing stopped will be written to this variable.
+ * @param-out int $rest_index
  * @return string[]|false[]|false This function will return an array of option / argument pairs or false on
  * failure.
  */
+#[Pure(true)]
 function getopt(
     string $short_options,
     array $long_options = [],
     #[StubsElementAvailable(from: '7.1')] &$rest_index
@@ -805,9 +812,9 @@
 
 /**
  * Gets system load average
  * @link https://php.net/manual/en/function.sys-getloadavg.php
- * @return array|false an array with three samples (last 1, 5 and 15
+ * @return array{float, float, float}|false an array with three samples (last 1, 5 and 15
  * minutes).
  * @since 5.1.3
  */
 #[Pure(true)]
@@ -855,10 +862,9 @@
 /**
  * Gets the current resource usages
  * @link https://php.net/manual/en/function.getrusage.php
  * @param int $mode <p>
- * If who is 1, getrusage will be called with
- * RUSAGE_CHILDREN.
+ * If mode is 1, getrusage will be called with RUSAGE_CHILDREN.
  * </p>
  * @return array|false an associative array containing the data returned from the system
  * call. All entries are accessible by using their documented field names.
  */
@@ -884,8 +890,9 @@
  * of the return value, which should make the results more unique.
  * </p>
  * @return string the unique identifier, as a string.
  */
+#[Pure(true)]
 function uniqid(string $prefix = "", bool $more_entropy = false): string {}
 
 /**
  * Convert a quoted-printable string to an 8 bit string