From a683fcf4785f69a794b8fe1cdfcef6ec3ba3f65b Mon Sep 17 00:00:00 2001 From: "Maxim.Kolmakov" Date: Tue, 10 Nov 2020 10:57:40 +0100 Subject: [PATCH 1/3] Add different signatures for 8.0 and before --- PDO/PDO.php | 43 ++++ curl/curl.php | 42 +++- enchant/enchant.php | 51 ++++- gd/gd.php | 471 +++++++++++++++++++++++++++++++++++++--- imap/imap.php | 52 +++++ mbstring/mbstring.php | 34 +++ odbc/odbc.php | 18 ++ openssl/openssl.php | 209 ++++++++++++++++++ pgsql/pgsql.php | 50 +++++ shmop/shmop.php | 31 ++- sockets/sockets.php | 409 ++++++++++++++++++++++++++++++++-- standard/standard_7.php | 24 ++ standard/standard_9.php | 36 +++ sysvmsg/sysvmsg.php | 19 +- sysvsem/sysvsem.php | 27 ++- sysvshm/sysvshm.php | 23 +- xml/xml.php | 26 ++- zlib/zlib.php | 57 ++++- 18 files changed, 1566 insertions(+), 56 deletions(-) diff --git a/PDO/PDO.php b/PDO/PDO.php index 27a032d37..69ef6dfc5 100644 --- a/PDO/PDO.php +++ b/PDO/PDO.php @@ -2,6 +2,7 @@ // Start of PDO v.1.0.4dev use JetBrains\PhpStorm\ArrayShape; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; use JetBrains\PhpStorm\Pure; use JetBrains\PhpStorm\Deprecated; @@ -977,6 +978,7 @@ public function setAttribute ($attribute, $value) {} */ public function exec ($statement) {} + #[PhpStormStubsElementAvailable('5.3','8.0')] /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
* Executes an SQL statement, returning a result set as a PDOStatement object @@ -1003,6 +1005,30 @@ public function exec ($statement) {} */ public function query ($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = array()) {} + #[PhpStormStubsElementAvailable('8.0')] + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
+ * Executes an SQL statement, returning a result set as a PDOStatement object + * @link https://php.net/manual/en/pdo.query.php + * @param string $statement

+ * The SQL statement to prepare and execute. + *

+ *

+ * Data inside the query should be properly escaped. + *

+ * @param int $mode

+ * The fetch mode must be one of the PDO::FETCH_* constants. + *

+ * @param mixed $fetch_mode_args

+ * Arguments of custom class constructor when the mode + * parameter is set to PDO::FETCH_CLASS. + *

+ * @return PDOStatement|false PDO::query returns a PDOStatement object, or FALSE + * on failure. + * @see PDOStatement::setFetchMode For a full description of the second and following parameters. + */ + public function query ($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, ...$fetch_mode_args) {} + /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
* Returns the ID of the last inserted row or sequence value @@ -1546,6 +1572,7 @@ public function columnCount () {} */ public function getColumnMeta ($column) {} + #[PhpStormStubsElementAvailable('5.3','8.0')] /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
* Set the default fetch mode for this statement @@ -1561,6 +1588,22 @@ public function getColumnMeta ($column) {} */ public function setFetchMode ($mode, $className = null, array $params = array()) {} + #[PhpStormStubsElementAvailable('8.0')] + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
+ * Set the default fetch mode for this statement + * @link https://php.net/manual/en/pdostatement.setfetchmode.php + * @param int $mode

+ * The fetch mode must be one of the PDO::FETCH_* constants. + *

+ * @param string|object $classNameObject [optional]

+ * Class name or object + *

+ * @param mixed ...$params

Constructor arguments.

+ * @return bool TRUE on success or FALSE on failure. + */ + public function setFetchMode ($mode, $className = null, ...$params) {} + /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
* Advances to the next rowset in a multi-rowset statement handle diff --git a/curl/curl.php b/curl/curl.php index 0a1096d35..29bd0014a 100644 --- a/curl/curl.php +++ b/curl/curl.php @@ -1,6 +1,7 @@ - * @return resource|false|CurlHandle a cURL handle on success, false on errors. + * @return false|CurlHandle a cURL handle on success, false on errors. + */ +function curl_init ($url = null) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Initialize a cURL session + * @link https://php.net/manual/en/function.curl-init.php + * @param string $url [optional]

+ * If provided, the CURLOPT_URL option will be set + * to its value. You can manually set this using the + * curl_setopt function. + *

+ * @return resource|false a cURL handle on success, false on errors. */ function curl_init ($url = null) {} @@ -2152,11 +2168,22 @@ function curl_setopt_array ($handle, array $options) {} */ function curl_share_close ($share_handle) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * (PHP 5 >=5.5.0)
+ * Initialize a cURL share handle + * @link https://secure.php.net/manual/en/function.curl-share-init.php + * @return CurlShareHandle Returns resource of type "cURL Share Handle". + * @since 5.5 + */ +function curl_share_init () {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * (PHP 5 >=5.5.0)
* Initialize a cURL share handle * @link https://secure.php.net/manual/en/function.curl-share-init.php - * @return resource|CurlShareHandle Returns resource of type "cURL Share Handle". + * @return resource Returns resource of type "cURL Share Handle". * @since 5.5 */ function curl_share_init () {} @@ -2368,10 +2395,19 @@ function curl_file_create($filename, $mime_type = '', $posted_filename = '') {} */ function curl_close ($handle) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Returns a new cURL multi handle + * @link https://php.net/manual/en/function.curl-multi-init.php + * @return false|CurlMultiHandle a cURL multi handle resource on success, false on failure. + */ +function curl_multi_init () {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Returns a new cURL multi handle * @link https://php.net/manual/en/function.curl-multi-init.php - * @return resource|false|CurlMultiHandle a cURL multi handle resource on success, false on failure. + * @return resource|false a cURL multi handle resource on success, false on failure. */ function curl_multi_init () {} diff --git a/enchant/enchant.php b/enchant/enchant.php index 7d41737af..18fed7c77 100644 --- a/enchant/enchant.php +++ b/enchant/enchant.php @@ -2,15 +2,28 @@ // Start of enchant v.1.1.0 use JetBrains\PhpStorm\Deprecated; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; +#[PhpStormStubsElementAvailable("8.0")] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* create a new broker object capable of requesting * @link https://php.net/manual/en/function.enchant-broker-init.php - * @return resource|false|EnchantBroker a broker resource on success or FALSE. + * @return false|EnchantBroker a broker resource on success or FALSE. */ function enchant_broker_init () {} +#[PhpStormStubsElementAvailable('5.3',"8.0")] +/** + * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
+ * create a new broker object capable of requesting + * @link https://php.net/manual/en/function.enchant-broker-init.php + * @return false|resource a broker resource on success or FALSE. + */ +function enchant_broker_init() +{ +} + /** * Free the broker resource and its dictionaries * @link https://php.net/manual/en/function.enchant-broker-free.php @@ -64,6 +77,22 @@ function enchant_broker_get_dict_path ($broker, $dict_type) {} */ function enchant_broker_list_dicts ($broker) {} +#[PhpStormStubsElementAvailable('5.3', '8.0')] +/** + * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
+ * create a new dictionary using a tag + * @link https://php.net/manual/en/function.enchant-broker-request-dict.php + * @param resource $broker

+ * Broker resource + *

+ * @param string $tag

+ * A tag describing the locale, for example en_US, de_DE + *

+ * @return resource|false a dictionary resource on success or FALSE on failure. + */ +function enchant_broker_request_dict ($broker, $tag) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* create a new dictionary using a tag @@ -74,10 +103,26 @@ function enchant_broker_list_dicts ($broker) {} * @param string $tag

* A tag describing the locale, for example en_US, de_DE *

- * @return resource|false|EnchantDictionary a dictionary resource on success or FALSE on failure. + * @return EnchantDictionary|false a dictionary resource on success or FALSE on failure. */ function enchant_broker_request_dict ($broker, $tag) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
+ * creates a dictionary using a PWL file + * @link https://php.net/manual/en/function.enchant-broker-request-pwl-dict.php + * @param resource $broker

+ * Broker resource + *

+ * @param string $filename

+ * Path to the PWL file. + *

+ * @return false|EnchantDictionary a dictionary resource on success or FALSE on failure. + */ +function enchant_broker_request_pwl_dict ($broker, $filename) {} + +#[PhpStormStubsElementAvailable('5.3', '8.0')] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* creates a dictionary using a PWL file @@ -88,7 +133,7 @@ function enchant_broker_request_dict ($broker, $tag) {} * @param string $filename

* Path to the PWL file. *

- * @return resource|false|EnchantDictionary a dictionary resource on success or FALSE on failure. + * @return resource|false a dictionary resource on success or FALSE on failure. */ function enchant_broker_request_pwl_dict ($broker, $filename) {} diff --git a/gd/gd.php b/gd/gd.php index 764c9f9b5..4bb2d5d00 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1,6 +1,7 @@ * A string containing the image data. *

- * @return resource|GdImage|false An image resource will be returned on success. FALSE is returned if + * @return GdImage|false An image resource will be returned on success. FALSE is returned if * the image type is unsupported, the data is not in a recognised format, * or the image is corrupt and cannot be loaded. */ #[Pure] function imagecreatefromstring ($image) {} +#[PhpStormStubsElementAvailable("5.3",'8.0')] +/** + * Create a new image from the image stream in the string + * @link https://php.net/manual/en/function.imagecreatefromstring.php + * @param string $image

+ * A string containing the image data. + *

+ * @return resource|false An image resource will be returned on success. FALSE is returned if + * the image type is unsupported, the data is not in a recognised format, + * or the image is corrupt and cannot be loaded. + */ +#[Pure] +function imagecreatefromstring($image) +{ +} + + /** * Get the index of the closest color to the specified color * @link https://php.net/manual/en/function.imagecolorclosest.php @@ -496,6 +515,7 @@ function imagecopymergegray ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $ */ function imagecopyresized ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {} +#[PhpStormStubsElementAvailable("8.0")] /** * Create a new palette based image * @link https://php.net/manual/en/function.imagecreate.php @@ -505,11 +525,29 @@ function imagecopyresized ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_ * @param int $height

* The image height. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return GdImage|false an image resource identifier on success, false on errors. */ #[Pure] function imagecreate ($width, $height) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a new palette based image + * @link https://php.net/manual/en/function.imagecreate.php + * @param int $width

+ * The image width. + *

+ * @param int $height

+ * The image height. + *

+ * @return resource|false an image resource identifier on success, false on errors. + */ +#[Pure] +function imagecreate($width, $height) +{ +} + +#[PhpStormStubsElementAvailable('8.0')] /** * Create a new true color image * @link https://php.net/manual/en/function.imagecreatetruecolor.php @@ -519,15 +557,42 @@ function imagecreate ($width, $height) {} * @param int $height

* Image height. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return GdImage|false an image resource identifier on success, false on errors. */ #[Pure] function imagecreatetruecolor ($width, $height) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a new true color image + * @link https://php.net/manual/en/function.imagecreatetruecolor.php + * @param int $width

+ * Image width. + *

+ * @param int $height

+ * Image height. + *

+ * @return resource|false an image resource identifier on success, false on errors. + */ +#[Pure] +function imagecreatetruecolor ($width, $height) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * Finds whether an image is a truecolor image * @link https://php.net/manual/en/function.imageistruecolor.php - * @param resource|GdImage $image + * @param GdImage $image + * @return bool true if the image is truecolor, false + * otherwise. + */ +#[Pure] +function imageistruecolor ($image) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Finds whether an image is a truecolor image + * @link https://php.net/manual/en/function.imageistruecolor.php + * @param resource $image * @return bool true if the image is truecolor, false * otherwise. */ @@ -770,6 +835,25 @@ function imagecolorexactalpha ($image, $red, $green, $blue, $alpha) {} */ function imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Rotate an image with a given angle + * @link https://php.net/manual/en/function.imagerotate.php + * @param resource|GdImage $image + * @param float $angle

+ * Rotation angle, in degrees. + *

+ * @param int $bgd_color

+ * Specifies the color of the uncovered zone after the rotation + *

+ * @param int $ignore_transparent [optional]

+ * If set and non-zero, transparent colors are ignored (otherwise kept). + *

+ * @return resource|false the rotated image or FALSE on failure + */ +function imagerotate ($image, $angle, $bgd_color, $ignore_transparent = null) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * Rotate an image with a given angle * @link https://php.net/manual/en/function.imagerotate.php @@ -783,7 +867,7 @@ function imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $sr * @param int $ignore_transparent [optional]

* If set and non-zero, transparent colors are ignored (otherwise kept). *

- * @return resource|GdImage|false the rotated image or FALSE on failure + * @return GdImage|false the rotated image or FALSE on failure */ function imagerotate ($image, $angle, $bgd_color, $ignore_transparent = null) {} @@ -834,97 +918,231 @@ function imagesetbrush ($image, $brush) {} */ function imagesetstyle ($image, array $style) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Create a new image from file or URL + * @link https://php.net/manual/en/function.imagecreatefrompng.php + * @param string $filename

+ * Path to the PNG image. + *

+ * @return GdImage|false an image resource identifier on success, false on errors. + */ +function imagecreatefrompng ($filename) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefrompng.php * @param string $filename

* Path to the PNG image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return resource|false an image resource identifier on success, false on errors. */ function imagecreatefrompng ($filename) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromgif.php * @param string $filename

* Path to the GIF image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return GdImage|false an image resource identifier on success, false on errors. */ function imagecreatefromgif ($filename) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a new image from file or URL + * @link https://php.net/manual/en/function.imagecreatefromgif.php + * @param string $filename

+ * Path to the GIF image. + *

+ * @return resource|false an image resource identifier on success, false on errors. + */ +function imagecreatefromgif ($filename) {} + +#[PhpStormStubsElementAvailable('8.0')] +/** + * Create a new image from file or URL + * @link https://php.net/manual/en/function.imagecreatefromjpeg.php + * @param string $filename

+ * Path to the JPEG image. + *

+ * @return GdImage|false an image resource identifier on success, false on errors. + */ +function imagecreatefromjpeg ($filename) {} + + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromjpeg.php * @param string $filename

* Path to the JPEG image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return resource|false an image resource identifier on success, false on errors. */ function imagecreatefromjpeg ($filename) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromwbmp.php * @param string $filename

* Path to the WBMP image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return GdImage|false an image resource identifier on success, false on errors. */ function imagecreatefromwbmp ($filename) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a new image from file or URL + * @link https://php.net/manual/en/function.imagecreatefromwbmp.php + * @param string $filename

+ * Path to the WBMP image. + *

+ * @return resource|false an image resource identifier on success, false on errors. + */ +function imagecreatefromwbmp ($filename) {} + +#[PhpStormStubsElementAvailable('8.0')] +/** + * Create a new image from file or URL + * @link https://php.net/manual/en/function.imagecreatefromwebp.php + * @param string $filename

+ * Path to the WebP image. + *

+ * @return GdImage|false an image resource identifier on success, false on errors. + * @since 5.4 + */ +function imagecreatefromwebp ($filename) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromwebp.php * @param string $filename

* Path to the WebP image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return resource|false an image resource identifier on success, false on errors. * @since 5.4 */ function imagecreatefromwebp ($filename) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromxbm.php * @param string $filename

* Path to the XBM image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return GdImage|false an image resource identifier on success, false on errors. */ function imagecreatefromxbm ($filename) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a new image from file or URL + * @link https://php.net/manual/en/function.imagecreatefromxbm.php + * @param string $filename

+ * Path to the XBM image. + *

+ * @return resource|false an image resource identifier on success, false on errors. + */ +function imagecreatefromxbm ($filename) {} + +#[PhpStormStubsElementAvailable('8.0')] +/** + * Create a new image from file or URL + * @link https://php.net/manual/en/function.imagecreatefromxpm.php + * @param string $filename

+ * Path to the XPM image. + *

+ * @return GdImage|false an image resource identifier on success, false on errors. + */ +function imagecreatefromxpm ($filename) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromxpm.php * @param string $filename

* Path to the XPM image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return resource|false an image resource identifier on success, false on errors. */ function imagecreatefromxpm ($filename) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Create a new image from GD file or URL * @link https://php.net/manual/en/function.imagecreatefromgd.php * @param string $filename

* Path to the GD file. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return GdImage|false an image resource identifier on success, false on errors. */ function imagecreatefromgd ($filename) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a new image from GD file or URL + * @link https://php.net/manual/en/function.imagecreatefromgd.php + * @param string $filename

+ * Path to the GD file. + *

+ * @return resource|false an image resource identifier on success, false on errors. + */ +function imagecreatefromgd ($filename) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a new image from GD2 file or URL + * @link https://php.net/manual/en/function.imagecreatefromgd2.php + * @param string $filename

+ * Path to the GD2 image. + *

+ * @return GdImage|false an image resource identifier on success, false on errors. + */ +function imagecreatefromgd2 ($filename) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Create a new image from GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2.php * @param string $filename

* Path to the GD2 image. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return resource|false an image resource identifier on success, false on errors. */ function imagecreatefromgd2 ($filename) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Create a new image from a given part of GD2 file or URL + * @link https://php.net/manual/en/function.imagecreatefromgd2part.php + * @param string $filename

+ * Path to the GD2 image. + *

+ * @param int $srcX

+ * x-coordinate of source point. + *

+ * @param int $srcY

+ * y-coordinate of source point. + *

+ * @param int $width

+ * Source width. + *

+ * @param int $height

+ * Source height. + *

+ * @return GdImage|false an image resource identifier on success, false on errors. + */ +function imagecreatefromgd2part ($filename, $srcX, $srcY, $width, $height) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Create a new image from a given part of GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2part.php @@ -943,7 +1161,7 @@ function imagecreatefromgd2 ($filename) {} * @param int $height

* Source height. *

- * @return resource|GdImage|false an image resource identifier on success, false on errors. + * @return resource|false an image resource identifier on success, false on errors. */ function imagecreatefromgd2part ($filename, $srcX, $srcY, $width, $height) {} @@ -1112,6 +1330,7 @@ function imagegammacorrect ($image, $inputgamma, $outputgamma) {} */ function imagefill ($image, $x, $y, $color) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Draw a filled polygon * @link https://php.net/manual/en/function.imagefilledpolygon.php @@ -1131,6 +1350,26 @@ function imagefill ($image, $x, $y, $color) {} */ function imagefilledpolygon ($image, array $points, $num_points, $color) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Draw a filled polygon + * @link https://php.net/manual/en/function.imagefilledpolygon.php + * @param resource|GdImage $image + * @param array $points

+ * An array containing the x and y + * coordinates of the polygons vertices consecutively. + *

+ * @param int $num_points

+ * Total number of vertices, which must be at least 3. + *

+ * @param int $color

+ * A color identifier created with + * imagecolorallocate. + *

+ * @return bool true on success or false on failure. + */ +function imagefilledpolygon ($image, array $points, $num_points, $color) {} + /** * Draw a filled rectangle * @link https://php.net/manual/en/function.imagefilledrectangle.php @@ -1285,6 +1524,7 @@ function imageline ($image, $x1, $y1, $x2, $y2, $color) {} */ function imageloadfont ($file) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Draws a polygon * @link https://php.net/manual/en/function.imagepolygon.php @@ -1319,6 +1559,41 @@ function imageloadfont ($file) {} */ function imagepolygon ($image, array $points, $num_points, $color) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Draws a polygon + * @link https://php.net/manual/en/function.imagepolygon.php + * @param resource|GdImage $image + * @param array $points

+ * An array containing the polygon's vertices, e.g.: + * + * points[0] + * = x0 + * + * + * points[1] + * = y0 + * + * + * points[2] + * = x1 + * + * + * points[3] + * = y1 + * + *

+ * @param int $num_points

+ * Total number of points (vertices). + *

+ * @param int $color

+ * A color identifier created with + * imagecolorallocate. + *

+ * @return bool true on success or false on failure. + */ +function imagepolygon ($image, array $points, $num_points, $color) {} + /** * Draw a rectangle * @link https://php.net/manual/en/function.imagerectangle.php @@ -1810,13 +2085,27 @@ function imageftbbox ($size, $angle, $fontfile, $text, $extrainfo = null ) {} */ function imagefttext ($image, $size, $angle, $x, $y, $color, $fontfile, $text, $extrainfo = null ) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Load a PostScript Type 1 font from file + * @link https://php.net/manual/en/function.imagepsloadfont.php + * @param string $filename

+ * Path to the Postscript font file. + *

+ * @return GdImage|false In the case everything went right, a valid font index will be returned and + * can be used for further purposes. Otherwise the function returns false. + * @removed 7.0 This function was REMOVED in PHP 7.0.0. + */ +function imagepsloadfont ($filename) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Load a PostScript Type 1 font from file * @link https://php.net/manual/en/function.imagepsloadfont.php * @param string $filename

* Path to the Postscript font file. *

- * @return resource|GdImage|false In the case everything went right, a valid font index will be returned and + * @return resource|false In the case everything went right, a valid font index will be returned and * can be used for further purposes. Otherwise the function returns false. * @removed 7.0 This function was REMOVED in PHP 7.0.0. */ @@ -2187,6 +2476,7 @@ function imagesetclip ($im, $x1, $y1, $x2, $y2) {} */ function imagegetclip ($im) {} +#[PhpStormStubsElementAvailable('8.0')] /** * imageopenpolygon() draws an open polygon on the given image. Contrary to {@see imagepolygon()}, no line is drawn between the last and the first point. * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. @@ -2206,11 +2496,43 @@ function imagegetclip ($im) {} */ function imageopenpolygon ($image , $points, $num_points, $color) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * imageopenpolygon() draws an open polygon on the given image. Contrary to {@see imagepolygon()}, no line is drawn between the last and the first point. + * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. + * @param array $points An array containing the polygon's vertices, e.g.: + *
+ * points[0]	= x0
+ * points[1]	= y0
+ * points[2]	= x1
+ * points[3]	= y1
+ * 
+ * @param int $num_points Total number of points (vertices). + * @param int $color A color identifier created with {@see imagecolorallocate()}. + * @return bool Returns TRUE on success or FALSE on failure. + * @link https://php.net/manual/en/function.imageopenpolygon.php + * @since 7.2 + * @see imageplygon() + */ +function imageopenpolygon ($image , $points, $num_points, $color) {} + +#[PhpStormStubsElementAvailable('8.0')] +/** + * imagecreatefrombmp() returns an image identifier representing the image obtained from the given filename. + * TIP A URL can be used as a filename with this function if the fopen wrappers have been enabled. See {@see fopen()} for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide. + * @param string $filename Path to the BMP image. + * @return GdImage|false Returns an image resource identifier on success, FALSE on errors. + * @link https://php.net/manual/en/function.imagecreatefrombmp.php + * @since 7.2 + */ +function imagecreatefrombmp($filename){} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * imagecreatefrombmp() returns an image identifier representing the image obtained from the given filename. * TIP A URL can be used as a filename with this function if the fopen wrappers have been enabled. See {@see fopen()} for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide. * @param string $filename Path to the BMP image. - * @return resource|GdImage|false Returns an image resource identifier on success, FALSE on errors. + * @return resource|false Returns an image resource identifier on success, FALSE on errors. * @link https://php.net/manual/en/function.imagecreatefrombmp.php * @since 7.2 */ @@ -2231,22 +2553,56 @@ function imagecreatefrombmp($filename){} */ function imagebmp ($image, $to = null, $compressed = true) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * @param string $filename + * @return GdImage|false + */ +function imagecreatefromtga($filename) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * @param string $filename - * @return resource|GdImage|false + * @return resource|false */ function imagecreatefromtga($filename) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Captures the whole screen * * https://www.php.net/manual/en/function.imagegrabscreen.php * - * @return resource|GdImage|false + * @return GdImage|false */ #[Pure] function imagegrabscreen() {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Captures the whole screen + * + * https://www.php.net/manual/en/function.imagegrabscreen.php + * + * @return resource|false + */ +#[Pure] +function imagegrabscreen() {} + +#[PhpStormStubsElementAvailable('8.0')] +/** + * Captures a window + * + * @link https://www.php.net/manual/en/function.imagegrabwindow.php + * + * @param int $handle + * @param int|null $client_area + * @return GdImage|false + */ +#[Pure] +function imagegrabwindow($handle, $client_area = null) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Captures a window * @@ -2254,7 +2610,7 @@ function imagegrabscreen() {} * * @param int $handle * @param int|null $client_area - * @return resource|GdImage|false + * @return resource|false */ #[Pure] function imagegrabwindow($handle, $client_area = null) {} @@ -2836,6 +3192,7 @@ function imagegrabwindow($handle, $client_area = null) {} define('IMG_TGA', 128); +#[PhpStormStubsElementAvailable('8.0')] /** * Return an image containing the affine tramsformed src image, using an optional clipping area * @link https://secure.php.net/manual/en/function.imageaffine.php @@ -2843,7 +3200,19 @@ function imagegrabwindow($handle, $client_area = null) {} * such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.

* @param array $affine

Array with keys 0 to 5.

* @param array $clip [optional]

Array with keys "x", "y", "width" and "height".

- * @return resource|GdImage|false Return affined image resource on success or FALSE on failure. + * @return GdImage|false Return affined image resource on success or FALSE on failure. + */ +function imageaffine($image, $affine, $clip = null) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Return an image containing the affine tramsformed src image, using an optional clipping area + * @link https://secure.php.net/manual/en/function.imageaffine.php + * @param resource|GdImage $image

An image resource, returned by one of the image creation functions, + * such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.

+ * @param array $affine

Array with keys 0 to 5.

+ * @param array $clip [optional]

Array with keys "x", "y", "width" and "height".

+ * @return resource|false Return affined image resource on success or FALSE on failure. */ function imageaffine($image, $affine, $clip = null) {} @@ -2868,6 +3237,20 @@ function imageaffinematrixconcat(array $m1, array $m2) {} function imageaffinematrixget ($type, $options = null) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Crop an image using the given coordinates and size, x, y, width and height + * @link https://secure.php.net/manual/en/function.imagecrop.php + * @param resource|GdImage $image

+ * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. + *

+ * @param array $rect

Array with keys "x", "y", "width" and "height".

+ * @return GdImage|false Return cropped image resource on success or FALSE on failure. + * @since 5.5 + */ +function imagecrop ($image, $rect) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Crop an image using the given coordinates and size, x, y, width and height * @link https://secure.php.net/manual/en/function.imagecrop.php @@ -2875,15 +3258,38 @@ function imageaffinematrixget ($type, $options = null) {} * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. *

* @param array $rect

Array with keys "x", "y", "width" and "height".

- * @return resource|GdImage|false Return cropped image resource on success or FALSE on failure. + * @return resource|false Return cropped image resource on success or FALSE on failure. * @since 5.5 */ function imagecrop ($image, $rect) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Crop an image automatically using one of the available modes * @link https://secure.php.net/manual/en/function.imagecropauto.php - * @param resource|GdImage $image

+ * @param GdImage $image

+ * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. + *

+ * @param int $mode [optional]

+ * One of IMG_CROP_* constants. + *

+ * @param float $threshold [optional]

+ * Used IMG_CROP_THRESHOLD mode. + *

+ * @param int $color [optional] + *

+ * Used in IMG_CROP_THRESHOLD mode. + *

+ * @return GdImage|bool Return cropped image resource on success or FALSE on failure. + * @since 5.5 + */ +function imagecropauto ($image, $mode = IMG_CROP_DEFAULT, $threshold = .5, $color = -1) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Crop an image automatically using one of the available modes + * @link https://secure.php.net/manual/en/function.imagecropauto.php + * @param resource $image

* An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. *

* @param int $mode [optional]

@@ -2896,7 +3302,7 @@ function imagecrop ($image, $rect) {} *

* Used in IMG_CROP_THRESHOLD mode. *

- * @return resource|GdImage|bool Return cropped image resource on success or FALSE on failure. + * @return resource|bool Return cropped image resource on success or FALSE on failure. * @since 5.5 */ function imagecropauto ($image, $mode = IMG_CROP_DEFAULT, $threshold = .5, $color = -1) {} @@ -2953,6 +3359,7 @@ function imageflip ($image, $mode) {} */ function imagepalettetotruecolor ($image) {} +#[PhpStormStubsElementAvailable('8.0')] /** * @since 5.5 * Scale an image using the given new width and height @@ -2963,9 +3370,23 @@ function imagepalettetotruecolor ($image) {} * @param int $new_width * @param int $new_height [optional] * @param int $mode [optional] One of IMG_NEAREST_NEIGHBOUR, IMG_BILINEAR_FIXED, IMG_BICUBIC, IMG_BICUBIC_FIXED or anything else (will use two pass). - * @return resource|GdImage|false Return scaled image resource on success or FALSE on failure. + * @return GdImage|false Return scaled image resource on success or FALSE on failure. */ +function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_FIXED) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * @since 5.5 + * Scale an image using the given new width and height + * @link https://secure.php.net/manual/en/function.imagescale.php + * @param resource|GdImage $image

+ * An image resource, returnd by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. + *

+ * @param int $new_width + * @param int $new_height [optional] + * @param int $mode [optional] One of IMG_NEAREST_NEIGHBOUR, IMG_BILINEAR_FIXED, IMG_BICUBIC, IMG_BICUBIC_FIXED or anything else (will use two pass). + * @return resource|false Return scaled image resource on success or FALSE on failure. + */ function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_FIXED) {} /** diff --git a/imap/imap.php b/imap/imap.php index d6bf21a8a..a535901fb 100644 --- a/imap/imap.php +++ b/imap/imap.php @@ -1,6 +1,7 @@ + *
toaddress
full to: line, up to 1024 characters + *
to
an array of objects from the To: line, with the following properties: personal, adl, mailbox, and host + *
fromaddress
full from: line, up to 1024 characters + *
from
an array of objects from the From: line, with the following properties: personal, adl, mailbox, and host + *
ccaddress
full cc: line, up to 1024 characters + *
cc
an array of objects from the Cc: line, with the following properties: personal, adl, mailbox, and host + *
bccaddress
full bcc: line, up to 1024 characters + *
bcc
an array of objects from the Bcc: line, with the following properties: personal, adl, mailbox, and host + *
reply_toaddress
full Reply-To: line, up to 1024 characters + *
reply_to
an array of objects from the Reply-To: line, with the following properties: personal, adl, mailbox, and host + *
senderaddress
full sender: line, up to 1024 characters + *
sender
an array of objects from the Sender: line, with the following properties: personal, adl, mailbox, and host + *
return_pathaddress
full Return-Path: line, up to 1024 characters + *
return_path
an array of objects from the Return-Path: line, with the following properties: personal, adl, mailbox, and host + *
remail - + *
date
The message date as found in its headers + *
Date
Same as date + *
subject
The message subject + *
Subject
Same a subject + *
in_reply_to - + *
message_id - + *
newsgroups - + *
followup_to - + *
references - + *
Recent
R if recent and seen, N if recent and not seen, ' ' if not recent. + *
Unseen
U if not seen AND not recent, ' ' if seen OR not seen and recent + *
Flagged
F if flagged, ' ' if not flagged + *
Answered
A if answered, ' ' if unanswered + *
Deleted
D if deleted, ' ' if not deleted + *
Draft
X if draft, ' ' if not draft + *
Msgno
The message number + *
MailDate - + *
Size
The message size + *
udate
mail message date in Unix time + *
fetchfrom
from line formatted to fit fromlength characters + *
fetchsubject
subject line formatted to fit subjectlength characters + * + */ +function imap_headerinfo ($stream_id, $msg_no, $from_length = 0, $subject_length = 0) {} + /** * Parse mail headers from a string * @link https://php.net/manual/en/function.imap-rfc822-parse-headers.php diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index 300f279b4..15b4629ad 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -3,6 +3,7 @@ // Start of mbstring v. use JetBrains\PhpStorm\Deprecated; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; use JetBrains\PhpStorm\Pure; @@ -186,6 +187,7 @@ function mb_detect_order ($encoding = null) {} */ function mb_substitute_character ($substitute_character = null) {} +#[PhpStormStubsElementAvailable('5.3', '8.0')] /** * Parse GET/POST/COOKIE data and set global variable * @link https://php.net/manual/en/function.mb-parse-str.php @@ -199,6 +201,20 @@ function mb_substitute_character ($substitute_character = null) {} */ function mb_parse_str ($string, array &$result = null) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Parse GET/POST/COOKIE data and set global variable + * @link https://php.net/manual/en/function.mb-parse-str.php + * @param string $string

+ * The URL encoded data. + *

+ * @param array &$result

+ * An array containing decoded and character encoded converted values. + *

+ * @return bool true on success or false on failure. + */ +function mb_parse_str ($string, array &$result) {} + /** * Callback function converts character encoding in output buffer * @link https://php.net/manual/en/function.mb-output-handler.php @@ -812,6 +828,7 @@ function mb_convert_variables ($to_encoding, $from_encoding, &$var, &...$vars) { #[Pure] function mb_encode_numericentity ($string, array $map, $encoding = null, $hex = false) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Decode HTML numeric string reference to character * @link https://php.net/manual/en/function.mb-decode-numericentity.php @@ -831,6 +848,23 @@ function mb_encode_numericentity ($string, array $map, $encoding = null, $hex = #[Pure] function mb_decode_numericentity ($string, array $map, $encoding = null, $is_hex = false) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Decode HTML numeric string reference to character + * @link https://php.net/manual/en/function.mb-decode-numericentity.php + * @param string $str

+ * The string being decoded. + *

+ * @param int[] $map

+ * convmap is an array that specifies + * the code area to convert. + *

+ * @param string $encoding &mbstring.encoding.parameter; + * @return string|false|null The converted string. + */ +#[Pure] +function mb_decode_numericentity ($string, array $map, $encoding = null) {} + /** * Send encoded mail * @link https://php.net/manual/en/function.mb-send-mail.php diff --git a/odbc/odbc.php b/odbc/odbc.php index f4a1f1d60..2197db619 100644 --- a/odbc/odbc.php +++ b/odbc/odbc.php @@ -1,6 +1,7 @@ odbc_connect for details.

+ * @param string $query_string

+ * The SQL statement. + *

+ * @return resource|false an ODBC result identifier if the SQL command was executed + * successfully, or FALSE on error. + */ +function odbc_exec($connection_id, $query_string) +{ +} + /** * Fetch a result row as an associative array * @link https://php.net/manual/en/function.odbc-fetch-array.php diff --git a/openssl/openssl.php b/openssl/openssl.php index 1e527fb72..7472a20fa 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -2,6 +2,7 @@ // Start of openssl v. use JetBrains\PhpStorm\Deprecated; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; /** * Frees a private key @@ -14,6 +15,7 @@ #[Deprecated(since: '8.0')] function openssl_pkey_free($key) { } +#[PhpStormStubsElementAvailable("5.3",'8.0')] /** * Generates a new private key * @link https://php.net/manual/en/function.openssl-pkey-new.php @@ -28,6 +30,23 @@ function openssl_pkey_free($key) { } */ function openssl_pkey_new(array $options = null) { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Generates a new private key + * @link https://php.net/manual/en/function.openssl-pkey-new.php + * @param array $options [optional]

+ * You can finetune the key generation (such as specifying the number of + * bits) using configargs. See + * openssl_csr_new for more information about + * configargs. + *

+ * @return OpenSSLAsymmetricKey|false a resource identifier for the pkey on success, or false on + * error. + */ +function openssl_pkey_new(array $options = null) +{ +} + /** * Gets an exportable representation of a key into a string * @link https://php.net/manual/en/function.openssl-pkey-export.php @@ -218,6 +237,8 @@ function openssl_spki_export_challenge (&$spki ) {} * @since 5.6 */ function openssl_spki_export (&$spki ) {} + +#[PhpStormStubsElementAvailable("5.3","8.0")] /** * Parse an X.509 certificate and return a resource identifier for * it @@ -227,6 +248,18 @@ function openssl_spki_export (&$spki ) {} */ function openssl_x509_read($certificate) { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Parse an X.509 certificate and return a resource identifier for + * it + * @link https://php.net/manual/en/function.openssl-x509-read.php + * @param mixed $certificate + * @return OpenSSLCertificate|false a resource identifier on success or false on failure. + */ +function openssl_x509_read($certificate) +{ +} + /** * @param string $certificate * @param string $digest_algo [optional] hash method @@ -422,6 +455,7 @@ function openssl_pkcs12_export_to_file($certificate, $output_filename, $private_ */ function openssl_pkcs12_read($pkcs12, array &$certificates, $passphrase) { } +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Generates a CSR * @link https://php.net/manual/en/function.openssl-csr-new.php @@ -517,6 +551,103 @@ function openssl_pkcs12_read($pkcs12, array &$certificates, $passphrase) { } */ function openssl_csr_new(array $distinguished_names, &$private_key, array $options = null, array $extra_attributes = null) { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Generates a CSR + * @link https://php.net/manual/en/function.openssl-csr-new.php + * @param array $distinguished_names

+ * The Distinguished Name to be used in the certificate. + *

+ * @param resource &$private_key

+ * privkey should be set to a private key that was + * previously generated by openssl_pkey_new (or + * otherwise obtained from the other openssl_pkey family of functions). + * The corresponding public portion of the key will be used to sign the + * CSR. + *

+ * @param array $options [optional]

+ * By default, the information in your system openssl.conf + * is used to initialize the request; you can specify a configuration file + * section by setting the config_section_section key of + * configargs. You can also specify an alternative + * openssl configuration file by setting the value of the + * config key to the path of the file you want to use. + * The following keys, if present in configargs + * behave as their equivalents in the openssl.conf, as + * listed in the table below. + * + * Configuration overrides + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
configargs keytypeopenssl.conf equivalentdescription
digest_algstringdefault_mdSelects which digest method to use
x509_extensionsstringx509_extensionsSelects which extensions should be used when creating an x509 + * certificate
req_extensionsstringreq_extensionsSelects which extensions should be used when creating a CSR
private_key_bitsintegerdefault_bitsSpecifies how many bits should be used to generate a private + * key
private_key_typeintegernoneSpecifies the type of private key to create. This can be one + * of OPENSSL_KEYTYPE_DSA, + * OPENSSL_KEYTYPE_DH or + * OPENSSL_KEYTYPE_RSA. + * The default value is OPENSSL_KEYTYPE_RSA which + * is currently the only supported key type. + *
encrypt_keybooleanencrypt_keyShould an exported key (with passphrase) be encrypted?
encrypt_key_cipherintegernone + * One of cipher constants. + *
+ *

+ * @param array $extra_attributes [optional]

+ * extraattribs is used to specify additional + * configuration options for the CSR. Both dn and + * extraattribs are associative arrays whose keys are + * converted to OIDs and applied to the relevant part of the request. + *

+ * @return false|OpenSSLCertificateSigningRequest the CSR. + */ +function openssl_csr_new(array $distinguished_names, &$private_key, array $options = null, array $extra_attributes = null) { } + + /** * Exports a CSR as a string * @link https://php.net/manual/en/function.openssl-csr-export.php @@ -539,6 +670,7 @@ function openssl_csr_export($csr, &$output, $no_text = true) { } */ function openssl_csr_export_to_file($csr, $output_filename, $no_text = true) { } +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Sign a CSR with another certificate (or itself) and generate a certificate * @link https://php.net/manual/en/function.openssl-csr-sign.php @@ -574,6 +706,42 @@ function openssl_csr_export_to_file($csr, $output_filename, $no_text = true) { } */ function openssl_csr_sign($csr, $ca_certificate, $private_key, $days, array $options = null, $serial = 0) { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Sign a CSR with another certificate (or itself) and generate a certificate + * @link https://php.net/manual/en/function.openssl-csr-sign.php + * @param mixed $csr

+ * A CSR previously generated by openssl_csr_new. + * It can also be the path to a PEM encoded CSR when specified as + * file://path/to/csr or an exported string generated + * by openssl_csr_export. + *

+ * @param mixed $ca_certificate

+ * The generated certificate will be signed by cacert. + * If cacert is null, the generated certificate + * will be a self-signed certificate. + *

+ * @param mixed $private_key

+ * priv_key is the private key that corresponds to + * cacert. + *

+ * @param int $days

+ * days specifies the length of time for which the + * generated certificate will be valid, in days. + *

+ * @param array $options [optional]

+ * You can finetune the CSR signing by configargs. + * See openssl_csr_new for more information about + * configargs. + *

+ * @param int $serial [optional]

+ * An optional the serial number of issued certificate. If not specified + * it will default to 0. + *

+ * @return OpenSSLCertificate|false an x509 certificate resource on success, false on failure. + */ +function openssl_csr_sign($csr, $ca_certificate, $private_key, $days, array $options = null, $serial = 0) { } + /** * Returns the subject of a CERT * @link https://php.net/manual/en/function.openssl-csr-get-subject.php @@ -705,6 +873,7 @@ function openssl_sign($data, &$signature, $private_key, $algorithm = OPENSSL_ALG */ function openssl_verify($data, $signature, $public_key, $algorithm = OPENSSL_ALGO_SHA1) { } +#[PhpStormStubsElementAvailable("5.3","8.0")] /** * Seal (encrypt) data * @link https://php.net/manual/en/function.openssl-seal.php @@ -721,6 +890,26 @@ function openssl_verify($data, $signature, $public_key, $algorithm = OPENSSL_ALG */ function openssl_seal($data, &$sealed_data, array &$encrypted_keys, array $public_key, $cipher_algo = null, &$iv = '') { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Seal (encrypt) data + * @link https://php.net/manual/en/function.openssl-seal.php + * @param string $data + * @param string &$sealed_data + * @param array &$encrypted_keys + * @param array $public_key + * @param string $cipher_algo + * @param string &$iv [optional] + * @return int|false the length of the sealed data on success, or false on error. + * If successful the sealed data is returned in + * sealed_data, and the envelope keys in + * env_keys. + */ +function openssl_seal($data, &$sealed_data, array &$encrypted_keys, array $public_key, $cipher_algo, &$iv = '') +{ +} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Open sealed data * @link https://php.net/manual/en/function.openssl-open.php @@ -737,6 +926,26 @@ function openssl_seal($data, &$sealed_data, array &$encrypted_keys, array $publi */ function openssl_open($data, &$output, $encrypted_key, $private_key, $cipher_algo = "RC4", string $iv) { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Open sealed data + * @link https://php.net/manual/en/function.openssl-open.php + * @param string $data + * @param string &$output

+ * If the call is successful the opened data is returned in this + * parameter. + *

+ * @param string $encrypted_key + * @param mixed $private_key + * @param string $cipher_algo The cipher method. + * @param string $iv [optional] The initialization vector. + * @return bool true on success or false on failure. + */ +function openssl_open($data, &$output, $encrypted_key, $private_key, $cipher_algo, string $iv) +{ +} + + /** * Generates a PKCS5 v2 PBKDF2 string, defaults to SHA-1 * @link https://secure.php.net/manual/en/function.openssl-pbkdf2.php diff --git a/pgsql/pgsql.php b/pgsql/pgsql.php index e2113d989..936bba03f 100644 --- a/pgsql/pgsql.php +++ b/pgsql/pgsql.php @@ -1,6 +1,7 @@ + * PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + *

+ * @param string $pathname

+ * The full path and file name of the file on the client + * filesystem from which to read the large object data. + *

+ * @param mixed $object_id [optional]

+ * If an object_id is given the function + * will try to create a large object with this id, else a free + * object id is assigned by the server. The parameter + * was added in PHP 5.3 and relies on functionality that first + * appeared in PostgreSQL 8.1. + *

+ * @return int The OID of the newly created large object, or + * FALSE on failure. + */ +function pg_lo_import ($connection, $pathname, $object_id = null) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Export a large object to file * @link https://php.net/manual/en/function.pg-lo-export.php @@ -1279,6 +1308,27 @@ function pg_lo_import ($connection = null, $pathname, $object_id = null) {} */ function pg_lo_export ($connection = null, $oid, $pathname) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Export a large object to file + * @link https://php.net/manual/en/function.pg-lo-export.php + * @param resource $connection

+ * PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by + * pg_connect or pg_pconnect. + *

+ * @param int $oid

+ * The OID of the large object in the database. + *

+ * @param string $pathname

+ * The full path and file name of the file in which to write the + * large object on the client filesystem. + *

+ * @return bool TRUE on success or FALSE on failure. + */ +function pg_lo_export ($connection, $oid, $pathname) {} + /** * Seeks position within a large object * @link https://php.net/manual/en/function.pg-lo-seek.php diff --git a/shmop/shmop.php b/shmop/shmop.php index 701163b42..2cfba183d 100644 --- a/shmop/shmop.php +++ b/shmop/shmop.php @@ -2,7 +2,9 @@ // Start of shmop v. use JetBrains\PhpStorm\Deprecated; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; +#[PhpStormStubsElementAvailable('8.0')] /** * Create or open shared memory block * @link https://php.net/manual/en/function.shmop-open.php @@ -23,7 +25,34 @@ * @param int $size

* The size of the shared memory block you wish to create in bytes *

- * @return resource|false|Shmop On success shmop_open will return an id that you can + * @return false|Shmop On success shmop_open will return an id that you can + * use to access the shared memory segment you've created. FALSE is + * returned on failure. + */ +function shmop_open ($key, $mode, $permissions, $size) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create or open shared memory block + * @link https://php.net/manual/en/function.shmop-open.php + * @param int $key

+ * System's id for the shared memory block. + * Can be passed as a decimal or hex. + *

+ * @param int $mode

+ * The flags that you can use: + * "a" for access (sets SHM_RDONLY for shmat) + * use this flag when you need to open an existing shared memory + * segment for read only + * @param int $permissions

+ * The permissions that you wish to assign to your memory segment, those + * are the same as permission for a file. Permissions need to be passed + * in octal form, like for example 0644 + *

+ * @param int $size

+ * The size of the shared memory block you wish to create in bytes + *

+ * @return resource|false On success shmop_open will return an id that you can * use to access the shared memory segment you've created. FALSE is * returned on failure. */ diff --git a/sockets/sockets.php b/sockets/sockets.php index 5fa17dd35..4dca48ced 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -1,7 +1,28 @@ + * Get array with contents of getaddrinfo about the given hostname. + * @link https://www.php.net/manual/en/function.socket-addrinfo-lookup.php + * @param string $host

+ * Hostname to search. + *

+ * @param string $service [optional]

+ * The service to connect to. If service is a name, it is translated to the corresponding port number. + *

+ * @param array $hints [optional]

+ * Hints provide criteria for selecting addresses returned. You may specify the hints as defined by getadrinfo. + *

+ * @return resource of AddrInfo resource handles that can be used with the other socket_addrinfo functions. + * @since 7.2 + */ +function socket_addrinfo_lookup($host, $service, $hints) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * (PHP 7 >= 7.2.0)
* Get array with contents of getaddrinfo about the given hostname. @@ -20,27 +41,56 @@ */ function socket_addrinfo_lookup($host, $service, $hints) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Create a Socket resource, and connect it to the provided AddrInfo resource.
* The return value of this function may be used with the rest of the socket functions. * @link https://www.php.net/manual/en/function.socket-addrinfo-connect.php - * @param resource|AddressInfo $addr

+ * @param AddressInfo $addr

* Resource created from {@see socket_addrinfo_lookup()} *

- * @return resource|Socket|null Socket resource on success or NULL on failure. + * @return Socket|null Socket resource on success or NULL on failure. * @since 7.2 */ function socket_addrinfo_connect($addr) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create a Socket resource, and connect it to the provided AddrInfo resource.
+ * The return value of this function may be used with the rest of the socket functions. + * @link https://www.php.net/manual/en/function.socket-addrinfo-connect.php + * @param resource $addr

+ * Resource created from {@see socket_addrinfo_lookup()} + *

+ * @return resource|null Socket resource on success or NULL on failure. + * @since 7.2 + */ +function socket_addrinfo_connect($addr) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * (PHP 7 >= 7.2.0)
* Create a Socket resource, and bind it to the provided AddrInfo resource.
* The return value of this function may be used with {@see socket_listen()}. * @link https://www.php.net/manual/en/function.socket-addrinfo-bind.php - * @param resource|AddressInfo $addr

+ * @param AddressInfo $addr

* Resource created from {@see socket_addrinfo_lookup()} *

- * @return resource|Socket|null Socket resource on success or NULL on failure. + * @return Socket|null Socket resource on success or NULL on failure. + * @since 7.2 + */ +function socket_addrinfo_bind($addr) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * (PHP 7 >= 7.2.0)
+ * Create a Socket resource, and bind it to the provided AddrInfo resource.
+ * The return value of this function may be used with {@see socket_listen()}. + * @link https://www.php.net/manual/en/function.socket-addrinfo-bind.php + * @param resource $addr

+ * Resource created from {@see socket_addrinfo_lookup()} + *

+ * @return resource|null Socket resource on success or NULL on failure. * @since 7.2 */ function socket_addrinfo_bind($addr) {} @@ -107,6 +157,7 @@ function socket_addrinfo_explain($addr) {} */ function socket_select (array &$read, array &$write, array &$except, $tv_sec, $tv_usec = 0) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Create a socket (endpoint for communication) * @link https://php.net/manual/en/function.socket-create.php @@ -237,7 +288,7 @@ function socket_select (array &$read, array &$write, array &$except, $tv_sec, $t * * * - * @return resource|Socket|false socket_create returns a socket resource on success, + * @return Socket|false socket_create returns a socket resource on success, * or FALSE on error. The actual error code can be retrieved by calling * socket_last_error. This error code may be passed to * socket_strerror to get a textual explanation of the @@ -245,9 +296,156 @@ function socket_select (array &$read, array &$write, array &$except, $tv_sec, $t */ function socket_create ($domain, $type, $protocol) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] /** - * @param resource|Socket $socket - * @return resource|Socket|false + * Create a socket (endpoint for communication) + * @link https://php.net/manual/en/function.socket-create.php + * @param int $domain

+ * The domain parameter specifies the protocol + * family to be used by the socket. + *

+ * + * Available address/protocol families + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
DomainDescription
AF_INET + * IPv4 Internet based protocols. TCP and UDP are common protocols of + * this protocol family. + *
AF_INET6 + * IPv6 Internet based protocols. TCP and UDP are common protocols of + * this protocol family. + *
AF_UNIX + * Local communication protocol family. High efficiency and low + * overhead make it a great form of IPC (Interprocess Communication). + *
+ * @param int $type

+ * The type parameter selects the type of communication + * to be used by the socket. + *

+ * + * Available socket types + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
TypeDescription
SOCK_STREAM + * Provides sequenced, reliable, full-duplex, connection-based byte streams. + * An out-of-band data transmission mechanism may be supported. + * The TCP protocol is based on this socket type. + *
SOCK_DGRAM + * Supports datagrams (connectionless, unreliable messages of a fixed maximum length). + * The UDP protocol is based on this socket type. + *
SOCK_SEQPACKET + * Provides a sequenced, reliable, two-way connection-based data transmission path for + * datagrams of fixed maximum length; a consumer is required to read an + * entire packet with each read call. + *
SOCK_RAW + * Provides raw network protocol access. This special type of socket + * can be used to manually construct any type of protocol. A common use + * for this socket type is to perform ICMP requests (like ping). + *
SOCK_RDM + * Provides a reliable datagram layer that does not guarantee ordering. + * This is most likely not implemented on your operating system. + *
+ * @param int $protocol

+ * The protocol parameter sets the specific + * protocol within the specified domain to be used + * when communicating on the returned socket. The proper value can be + * retrieved by name by using getprotobyname. If + * the desired protocol is TCP, or UDP the corresponding constants + * SOL_TCP, and SOL_UDP + * can also be used. + *

+ * + * Common protocols + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
NameDescription
icmp + * The Internet Control Message Protocol is used primarily by gateways + * and hosts to report errors in datagram communication. The "ping" + * command (present in most modern operating systems) is an example + * application of ICMP. + *
udp + * The User Datagram Protocol is a connectionless, unreliable, + * protocol with fixed record lengths. Due to these aspects, UDP + * requires a minimum amount of protocol overhead. + *
tcp + * The Transmission Control Protocol is a reliable, connection based, + * stream oriented, full duplex protocol. TCP guarantees that all data packets + * will be received in the order in which they were sent. If any packet is somehow + * lost during communication, TCP will automatically retransmit the packet until + * the destination host acknowledges that packet. For reliability and performance + * reasons, the TCP implementation itself decides the appropriate octet boundaries + * of the underlying datagram communication layer. Therefore, TCP applications must + * allow for the possibility of partial record transmission. + *
+ * @return resource|false socket_create returns a socket resource on success, + * or FALSE on error. The actual error code can be retrieved by calling + * socket_last_error. This error code may be passed to + * socket_strerror to get a textual explanation of the + * error. + */ +function socket_create ($domain, $type, $protocol) {} + +#[PhpStormStubsElementAvailable('8.0')] +/** + * @param Socket $socket + * @return Socket|false + */ +function socket_export_stream($socket) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * @param resource $socket + * @return resource|false */ function socket_export_stream($socket) {} @@ -305,13 +503,14 @@ function socket_create_listen ($port, $backlog = 128) {} */ function socket_create_pair ($domain, $type, $protocol, array &$fd) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Accepts a connection on a socket * @link https://php.net/manual/en/function.socket-accept.php - * @param resource|Socket $socket

+ * @param Socket $socket

* A valid socket resource created with socket_create. *

- * @return resource|Socket|false a new socket resource on success, or FALSE on error. The actual + * @return Socket|false a new socket resource on success, or FALSE on error. The actual * error code can be retrieved by calling * socket_last_error. This error code may be passed to * socket_strerror to get a textual explanation of the @@ -319,10 +518,27 @@ function socket_create_pair ($domain, $type, $protocol, array &$fd) {} */ function socket_accept ($socket) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Accepts a connection on a socket + * @link https://php.net/manual/en/function.socket-accept.php + * @param resource $socket

+ * A valid socket resource created with socket_create. + *

+ * @return resource|false a new socket resource on success, or FALSE on error. The actual + * error code can be retrieved by calling + * socket_last_error. This error code may be passed to + * socket_strerror to get a textual explanation of the + * error. + */ +function socket_accept ($socket) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * Sets nonblocking mode for file descriptor fd * @link https://php.net/manual/en/function.socket-set-nonblock.php - * @param resource|Socket $socket

+ * @param Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

@@ -330,10 +546,23 @@ function socket_accept ($socket) {} */ function socket_set_nonblock ($socket) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Sets nonblocking mode for file descriptor fd + * @link https://php.net/manual/en/function.socket-set-nonblock.php + * @param resource $socket

+ * A valid socket resource created with socket_create + * or socket_accept. + *

+ * @return bool TRUE on success or FALSE on failure. + */ +function socket_set_nonblock ($socket) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * Sets blocking mode on a socket resource * @link https://php.net/manual/en/function.socket-set-block.php - * @param resource|Socket $socket

+ * @param Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

@@ -341,10 +570,53 @@ function socket_set_nonblock ($socket) {} */ function socket_set_block ($socket) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Sets blocking mode on a socket resource + * @link https://php.net/manual/en/function.socket-set-block.php + * @param resource $socket

+ * A valid socket resource created with socket_create + * or socket_accept. + *

+ * @return bool TRUE on success or FALSE on failure. + */ +function socket_set_block ($socket) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * Listens for a connection on a socket * @link https://php.net/manual/en/function.socket-listen.php - * @param resource|Socket $socket

+ * @param Socket $socket

+ * A valid socket resource created with socket_create. + *

+ * @param int $backlog [optional]

+ * A maximum of backlog incoming connections will be + * queued for processing. If a connection request arrives with the queue + * full the client may receive an error with an indication of + * ECONNREFUSED, or, if the underlying protocol supports + * retransmission, the request may be ignored so that retries may succeed. + *

+ *

+ * The maximum number passed to the backlog + * parameter highly depends on the underlying platform. On Linux, it is + * silently truncated to SOMAXCONN. On win32, if + * passed SOMAXCONN, the underlying service provider + * responsible for the socket will set the backlog to a maximum + * reasonable value. There is no standard provision to + * find out the actual backlog value on this platform. + *

+ * @return bool TRUE on success or FALSE on failure. The error code can be retrieved with + * socket_last_error. This code may be passed to + * socket_strerror to get a textual explanation of the + * error. + */ +function socket_listen ($socket, $backlog = 0) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Listens for a connection on a socket + * @link https://php.net/manual/en/function.socket-listen.php + * @param resource $socket

* A valid socket resource created with socket_create. *

* @param int $backlog [optional]

@@ -370,10 +642,11 @@ function socket_set_block ($socket) {} */ function socket_listen ($socket, $backlog = 0) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Closes a socket resource * @link https://php.net/manual/en/function.socket-close.php - * @param resource|Socket $socket

+ * @param Socket $socket

* A valid socket resource created with socket_create * or socket_accept. *

@@ -381,10 +654,51 @@ function socket_listen ($socket, $backlog = 0) {} */ function socket_close ($socket) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Closes a socket resource + * @link https://php.net/manual/en/function.socket-close.php + * @param resource $socket

+ * A valid socket resource created with socket_create + * or socket_accept. + *

+ * @return void No value is returned. + */ +function socket_close ($socket) {} + +#[PhpStormStubsElementAvailable('8.0')] /** * Write to a socket * @link https://php.net/manual/en/function.socket-write.php - * @param resource|Socket $socket + * @param Socket $socket + * @param string $buffer

+ * The buffer to be written. + *

+ * @param int $length [optional]

+ * The optional parameter length can specify an + * alternate length of bytes written to the socket. If this length is + * greater than the buffer length, it is silently truncated to the length + * of the buffer. + *

+ * @return int|false the number of bytes successfully written to the socket or FALSE on failure. + * The error code can be retrieved with + * socket_last_error. This code may be passed to + * socket_strerror to get a textual explanation of the + * error. + *

+ *

+ * It is perfectly valid for socket_write to + * return zero which means no bytes have been written. Be sure to use the + * === operator to check for FALSE in case of an + * error. + */ +function socket_write ($socket, $buffer, $length = 0) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Write to a socket + * @link https://php.net/manual/en/function.socket-write.php + * @param resource $socket * @param string $buffer

* The buffer to be written. *

@@ -408,10 +722,43 @@ function socket_close ($socket) {} */ function socket_write ($socket, $buffer, $length = 0) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Reads a maximum of length bytes from a socket * @link https://php.net/manual/en/function.socket-read.php - * @param resource|Socket $socket

+ * @param Socket $socket

+ * A valid socket resource created with socket_create + * or socket_accept. + *

+ * @param int $length

+ * The maximum number of bytes read is specified by the + * length parameter. Otherwise you can use + * \r, \n, + * or \0 to end reading (depending on the type + * parameter, see below). + *

+ * @param int $type [optional]

+ * Optional type parameter is a named constant: + * PHP_BINARY_READ (Default) - use the system + * recv() function. Safe for reading binary data. + * @return string|false socket_read returns the data as a string on success, + * or FALSE on error (including if the remote host has closed the + * connection). The error code can be retrieved with + * socket_last_error. This code may be passed to + * socket_strerror to get a textual representation of + * the error. + *

+ *

+ * socket_read returns a zero length string ("") + * when there is no more data to read. + */ +function socket_read ($socket, $length, $type = PHP_BINARY_READ) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Reads a maximum of length bytes from a socket + * @link https://php.net/manual/en/function.socket-read.php + * @param resource $socket

* A valid socket resource created with socket_create * or socket_accept. *

@@ -1294,13 +1641,26 @@ function socket_last_error ($socket = null) {} */ function socket_clear_error ($socket = null) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Import a stream + * @link https://php.net/manual/en/function.socket-import-stream.php + * @param resource|Socket $stream

+ * The stream resource to import. + *

+ * @return Socket|false|null FALSE or NULL on failure. + * @since 5.4 + */ +function socket_import_stream ($stream) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Import a stream * @link https://php.net/manual/en/function.socket-import-stream.php * @param resource|Socket $stream

* The stream resource to import. *

- * @return resource|Socket|false|null FALSE or NULL on failure. + * @return resource|false|null FALSE or NULL on failure. * @since 5.4 */ function socket_import_stream ($stream) {} @@ -1346,13 +1706,28 @@ function socket_setopt ($socket, $level, $optname, $optval) {} */ function socket_wsaprotocol_info_export($socket, $target_pid) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Imports a Socket from another Process + * + * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-import.php + * + * @param string $info_id + * @return Socket|false + * + * @since 7.3 + */ +function socket_wsaprotocol_info_import($info_id) {} + + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Imports a Socket from another Process * * @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-import.php * * @param string $info_id - * @return resource|Socket|false + * @return resource|false * * @since 7.3 */ diff --git a/standard/standard_7.php b/standard/standard_7.php index 493cfae9f..536579d14 100644 --- a/standard/standard_7.php +++ b/standard/standard_7.php @@ -1,6 +1,7 @@ + * The string to be encrypted. + *

+ * @param string $salt

+ * An optional salt string to base the encryption on. If not provided, + * one will be randomly generated by PHP each time you call this function. + * PHP 5.6 or later raise E_NOTICE error if this parameter is omitted + *

+ *

+ * If you are using the supplied salt, you should be aware that the salt + * is generated once. If you are calling this function repeatedly, this + * may impact both appearance and security. + *

+ * @return string|null the encrypted string or NULL if an error occurs + */ +#[Pure] +function crypt ($string, $salt) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * One-way string encryption (hashing) * @link https://php.net/manual/en/function.crypt.php diff --git a/standard/standard_9.php b/standard/standard_9.php index fbd9f7e9d..96b71aa29 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -4,6 +4,7 @@ * @since 5.6 */ +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; use JetBrains\PhpStorm\Pure; define ("ARRAY_FILTER_USE_BOTH", 1); @@ -259,6 +260,24 @@ function array_rand(array $array, $num = null) { } #[Pure] function array_unique(array $array, $flags = SORT_STRING) { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Computes the intersection of arrays + * @link https://php.net/manual/en/function.array-intersect.php + * @param array $array

+ * The array with main values to check. + *

+ * @param mixed ...$arrays

+ * An array to compare values against. + *

+ * @return array an array containing all of the values in + * array1 whose values exist in all of the parameters. + * @meta + */ +#[Pure] +function array_intersect(array $array, ...$arrays) { } + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Computes the intersection of arrays * @link https://php.net/manual/en/function.array-intersect.php @@ -424,6 +443,23 @@ function array_intersect_uassoc(array $array1, array $array2, array $_ = null, $ #[Pure] function array_uintersect_uassoc(array $array1, array $array2, array $_ = null, $data_compare_func, $key_compare_func) { } +#[PhpStormStubsElementAvailable('8.0')] +/** + * Computes the difference of arrays + * @link https://php.net/manual/en/function.array-diff.php + * @param array $array

+ * The array to compare from + *

+ * @param mixed ...$excludes

+ * An array to compare against + * @return array an array containing all the entries from + * array1 that are not present in any of the other arrays. + * @meta + */ +#[Pure] +function array_diff(array $array, ...$excludes) { } + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Computes the difference of arrays * @link https://php.net/manual/en/function.array-diff.php diff --git a/sysvmsg/sysvmsg.php b/sysvmsg/sysvmsg.php index 9e9528a76..c75caa636 100644 --- a/sysvmsg/sysvmsg.php +++ b/sysvmsg/sysvmsg.php @@ -1,7 +1,22 @@ + * Message queue numeric ID + *

+ * @param int $permissions [optional]

+ * Queue permissions. Default to 0666. If the message queue already + * exists, the perms will be ignored. + *

+ * @return SysvMessageQueue a resource handle that can be used to access the System V message queue. + */ +function msg_get_queue ($key, $permissions = 0666) {} +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Create or attach to a message queue * @link https://php.net/manual/en/function.msg-get-queue.php @@ -12,7 +27,7 @@ * Queue permissions. Default to 0666. If the message queue already * exists, the perms will be ignored. *

- * @return resource|SysvMessageQueue a resource handle that can be used to access the System V message queue. + * @return resource a resource handle that can be used to access the System V message queue. */ function msg_get_queue ($key, $permissions = 0666) {} diff --git a/sysvsem/sysvsem.php b/sysvsem/sysvsem.php index 477c8d196..0f8bd9558 100644 --- a/sysvsem/sysvsem.php +++ b/sysvsem/sysvsem.php @@ -1,7 +1,9 @@ - * @return resource|false|SysvSemaphore a positive semaphore identifier on success, or FALSE on + * @return false|SysvSemaphore a positive semaphore identifier on success, or FALSE on + * error. + */ +function sem_get ($key, $max_acquire = 1, $permissions = 0666, $auto_release = 1) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Get a semaphore id + * @link https://php.net/manual/en/function.sem-get.php + * @param int $key + * @param int $max_acquire [optional]

+ * The number of processes that can acquire the semaphore simultaneously + * is set to max_acquire. + *

+ * @param int $permissions [optional]

+ * The semaphore permissions. Actually this value is + * set only if the process finds it is the only process currently + * attached to the semaphore. + *

+ * @param int $auto_release [optional]

+ * Specifies if the semaphore should be automatically released on request + * shutdown. + *

+ * @return resource|false a positive semaphore identifier on success, or FALSE on * error. */ function sem_get ($key, $max_acquire = 1, $permissions = 0666, $auto_release = 1) {} diff --git a/sysvshm/sysvshm.php b/sysvshm/sysvshm.php index a7610a24f..9a072c7fd 100644 --- a/sysvshm/sysvshm.php +++ b/sysvshm/sysvshm.php @@ -1,7 +1,9 @@ * The optional permission bits. Default to 0666. *

- * @return resource|SysvSharedMemory a shared memory segment identifier. + * @return SysvSharedMemory a shared memory segment identifier. + */ +function shm_attach ($key, $size = null, $permissions = 0666) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Creates or open a shared memory segment + * @link https://php.net/manual/en/function.shm-attach.php + * @param int $key

+ * A numeric shared memory segment ID + *

+ * @param int $size [optional]

+ * The memory size. If not provided, default to the + * sysvshm.init_mem in the php.ini, otherwise 10000 + * bytes. + *

+ * @param int $permissions [optional]

+ * The optional permission bits. Default to 0666. + *

+ * @return resource a shared memory segment identifier. */ function shm_attach ($key, $size = null, $permissions = 0666) {} diff --git a/xml/xml.php b/xml/xml.php index 9b3529973..02a29c6d9 100644 --- a/xml/xml.php +++ b/xml/xml.php @@ -1,8 +1,10 @@ - * @return resource|false|XmlParser a resource handle for the new XML parser. + * @return false|XmlParser a resource handle for the new XML parser. + */ +#[Pure] +function xml_parser_create ($encoding = null) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Create an XML parser + * @link https://php.net/manual/en/function.xml-parser-create.php + * @param string $encoding [optional]

+ * The optional encoding specifies the character + * encoding for the input/output in PHP 4. Starting from PHP 5, the input + * encoding is automatically detected, so that the + * encoding parameter specifies only the output + * encoding. In PHP 4, the default output encoding is the same as the + * input charset. If empty string is passed, the parser attempts to identify + * which encoding the document is encoded in by looking at the heading 3 or + * 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is + * ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported + * encodings are ISO-8859-1, UTF-8 and + * US-ASCII. + *

+ * @return resource|false a resource handle for the new XML parser. */ #[Pure] function xml_parser_create ($encoding = null) {} diff --git a/zlib/zlib.php b/zlib/zlib.php index 361bbf5fc..0e509d2d8 100644 --- a/zlib/zlib.php +++ b/zlib/zlib.php @@ -2,6 +2,7 @@ // Start of zlib v.2.0 use JetBrains\PhpStorm\Deprecated; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; use JetBrains\PhpStorm\Pure; /** @@ -407,6 +408,7 @@ function zlib_get_coding_type () {} */ function ob_gzhandler ($data, $flags) {} +#[PhpStormStubsElementAvailable('8.0')] /** * Initialize an incremental deflate context * @link https://php.net/manual/en/function.deflate-init.php @@ -422,7 +424,32 @@ function ob_gzhandler ($data, $flags) {} * ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY (the * default). dictionaryA string or an array of strings of the preset * dictionary (default: no preset dictionary).

- * @return resource|false|DeflateContext

+ * @return false|DeflateContext

+ * Returns a deflate context resource (zlib.deflate) on success, or + * FALSE on failure. + *

+ * @since 7.0 + */ +#[Pure] +function deflate_init ($encoding, $options = array()) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] +/** + * Initialize an incremental deflate context + * @link https://php.net/manual/en/function.deflate-init.php + * @param int $encoding

+ * One of the ZLIB_ENCODING_* constants. + *

+ * @param array $options

+ * An associative array which may contain the following elements: + * levelThe compression level in range -1..9; defaults to -1. + * memoryThe compression memory level in range 1..9; defaults to 8. + * windowThe zlib window size (logarithmic) in range 8..15; defaults + * to 15. strategyOne of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, + * ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY (the + * default). dictionaryA string or an array of strings of the preset + * dictionary (default: no preset dictionary).

+ * @return resource|false

* Returns a deflate context resource (zlib.deflate) on success, or * FALSE on failure. *

@@ -454,6 +481,32 @@ function deflate_init ($encoding, $options = array()) {} */ function deflate_add ($context, $data, $flush_mode = ZLIB_SYNC_FLUSH) {} +#[PhpStormStubsElementAvailable('8.0')] +/** + * Initialize an incremental inflate context + * @link https://php.net/manual/en/function.inflate-init.php + * @param int $encoding

+ * One of the ZLIB_ENCODING_* constants. + *

+ * @param array $options [optional]

+ * An associative array which may contain the following elements: + * levelThe compression level in range -1..9; defaults to -1. + * memoryThe compression memory level in range 1..9; defaults to 8. + * windowThe zlib window size (logarithmic) in range 8..15; defaults + * to 15. strategyOne of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, + * ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY (the + * default). dictionaryA string or an array of strings of the preset + * dictionary (default: no preset dictionary).

+ * @return false|InflateContext

+ * Returns an inflate context resource (zlib.inflate) on success, or + * FALSE on failure. + *

+ * @since 7.0 + */ +#[Pure] +function inflate_init ($encoding, $options = array()) {} + +#[PhpStormStubsElementAvailable('5.3','8.0')] /** * Initialize an incremental inflate context * @link https://php.net/manual/en/function.inflate-init.php @@ -469,7 +522,7 @@ function deflate_add ($context, $data, $flush_mode = ZLIB_SYNC_FLUSH) {} * ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY (the * default). dictionaryA string or an array of strings of the preset * dictionary (default: no preset dictionary).

- * @return resource|false|InflateContext

+ * @return resource|false

* Returns an inflate context resource (zlib.inflate) on success, or * FALSE on failure. *

From 914c8f722ac8d1367d669f64e94080f18a820261 Mon Sep 17 00:00:00 2001 From: "Maxim.Kolmakov" Date: Tue, 10 Nov 2020 11:35:06 +0100 Subject: [PATCH 2/3] Unify quotes + fix to version --- PDO/PDO.php | 4 +-- curl/curl.php | 6 ++--- enchant/enchant.php | 2 +- gd/gd.php | 56 ++++++++++++++++++++--------------------- imap/imap.php | 2 +- mbstring/mbstring.php | 2 +- odbc/odbc.php | 2 +- openssl/openssl.php | 12 ++++----- pgsql/pgsql.php | 4 +-- shmop/shmop.php | 2 +- sockets/sockets.php | 28 ++++++++++----------- standard/standard_7.php | 2 +- standard/standard_9.php | 4 +-- sysvmsg/sysvmsg.php | 2 +- sysvsem/sysvsem.php | 2 +- sysvshm/sysvshm.php | 2 +- xml/xml.php | 2 +- zlib/zlib.php | 4 +-- 18 files changed, 69 insertions(+), 69 deletions(-) diff --git a/PDO/PDO.php b/PDO/PDO.php index 69ef6dfc5..c2efd9243 100644 --- a/PDO/PDO.php +++ b/PDO/PDO.php @@ -978,7 +978,7 @@ public function setAttribute ($attribute, $value) {} */ public function exec ($statement) {} - #[PhpStormStubsElementAvailable('5.3','8.0')] + #[PhpStormStubsElementAvailable('5.3','7.4')] /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
* Executes an SQL statement, returning a result set as a PDOStatement object @@ -1572,7 +1572,7 @@ public function columnCount () {} */ public function getColumnMeta ($column) {} - #[PhpStormStubsElementAvailable('5.3','8.0')] + #[PhpStormStubsElementAvailable('5.3','7.4')] /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
* Set the default fetch mode for this statement diff --git a/curl/curl.php b/curl/curl.php index 29bd0014a..d2c3d7709 100644 --- a/curl/curl.php +++ b/curl/curl.php @@ -90,7 +90,7 @@ public function __wakeup() { */ function curl_init ($url = null) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Initialize a cURL session * @link https://php.net/manual/en/function.curl-init.php @@ -2178,7 +2178,7 @@ function curl_share_close ($share_handle) {} */ function curl_share_init () {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * (PHP 5 >=5.5.0)
* Initialize a cURL share handle @@ -2403,7 +2403,7 @@ function curl_close ($handle) {} */ function curl_multi_init () {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Returns a new cURL multi handle * @link https://php.net/manual/en/function.curl-multi-init.php diff --git a/enchant/enchant.php b/enchant/enchant.php index 18fed7c77..140994b78 100644 --- a/enchant/enchant.php +++ b/enchant/enchant.php @@ -13,7 +13,7 @@ */ function enchant_broker_init () {} -#[PhpStormStubsElementAvailable('5.3',"8.0")] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* create a new broker object capable of requesting diff --git a/gd/gd.php b/gd/gd.php index 4bb2d5d00..fb050e147 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -238,7 +238,7 @@ function imagepalettecopy ($destination, $source) {} #[Pure] function imagecreatefromstring ($image) {} -#[PhpStormStubsElementAvailable("5.3",'8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from the image stream in the string * @link https://php.net/manual/en/function.imagecreatefromstring.php @@ -530,7 +530,7 @@ function imagecopyresized ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_ #[Pure] function imagecreate ($width, $height) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new palette based image * @link https://php.net/manual/en/function.imagecreate.php @@ -562,7 +562,7 @@ function imagecreate($width, $height) #[Pure] function imagecreatetruecolor ($width, $height) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new true color image * @link https://php.net/manual/en/function.imagecreatetruecolor.php @@ -588,7 +588,7 @@ function imagecreatetruecolor ($width, $height) {} #[Pure] function imageistruecolor ($image) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Finds whether an image is a truecolor image * @link https://php.net/manual/en/function.imageistruecolor.php @@ -835,7 +835,7 @@ function imagecolorexactalpha ($image, $red, $green, $blue, $alpha) {} */ function imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Rotate an image with a given angle * @link https://php.net/manual/en/function.imagerotate.php @@ -929,7 +929,7 @@ function imagesetstyle ($image, array $style) {} */ function imagecreatefrompng ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefrompng.php @@ -951,7 +951,7 @@ function imagecreatefrompng ($filename) {} */ function imagecreatefromgif ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromgif.php @@ -974,7 +974,7 @@ function imagecreatefromgif ($filename) {} function imagecreatefromjpeg ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromjpeg.php @@ -996,7 +996,7 @@ function imagecreatefromjpeg ($filename) {} */ function imagecreatefromwbmp ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromwbmp.php @@ -1019,7 +1019,7 @@ function imagecreatefromwbmp ($filename) {} */ function imagecreatefromwebp ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromwebp.php @@ -1042,7 +1042,7 @@ function imagecreatefromwebp ($filename) {} */ function imagecreatefromxbm ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromxbm.php @@ -1064,7 +1064,7 @@ function imagecreatefromxbm ($filename) {} */ function imagecreatefromxpm ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromxpm.php @@ -1086,7 +1086,7 @@ function imagecreatefromxpm ($filename) {} */ function imagecreatefromgd ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from GD file or URL * @link https://php.net/manual/en/function.imagecreatefromgd.php @@ -1097,7 +1097,7 @@ function imagecreatefromgd ($filename) {} */ function imagecreatefromgd ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2.php @@ -1108,7 +1108,7 @@ function imagecreatefromgd ($filename) {} */ function imagecreatefromgd2 ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2.php @@ -1142,7 +1142,7 @@ function imagecreatefromgd2 ($filename) {} */ function imagecreatefromgd2part ($filename, $srcX, $srcY, $width, $height) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a new image from a given part of GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2part.php @@ -1350,7 +1350,7 @@ function imagefill ($image, $x, $y, $color) {} */ function imagefilledpolygon ($image, array $points, $num_points, $color) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Draw a filled polygon * @link https://php.net/manual/en/function.imagefilledpolygon.php @@ -1559,7 +1559,7 @@ function imageloadfont ($file) {} */ function imagepolygon ($image, array $points, $num_points, $color) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Draws a polygon * @link https://php.net/manual/en/function.imagepolygon.php @@ -2098,7 +2098,7 @@ function imagefttext ($image, $size, $angle, $x, $y, $color, $fontfile, $text, $ */ function imagepsloadfont ($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Load a PostScript Type 1 font from file * @link https://php.net/manual/en/function.imagepsloadfont.php @@ -2496,7 +2496,7 @@ function imagegetclip ($im) {} */ function imageopenpolygon ($image , $points, $num_points, $color) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * imageopenpolygon() draws an open polygon on the given image. Contrary to {@see imagepolygon()}, no line is drawn between the last and the first point. * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. @@ -2527,7 +2527,7 @@ function imageopenpolygon ($image , $points, $num_points, $color) {} */ function imagecreatefrombmp($filename){} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * imagecreatefrombmp() returns an image identifier representing the image obtained from the given filename. * TIP A URL can be used as a filename with this function if the fopen wrappers have been enabled. See {@see fopen()} for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide. @@ -2560,7 +2560,7 @@ function imagebmp ($image, $to = null, $compressed = true) {} */ function imagecreatefromtga($filename) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * @param string $filename * @return resource|false @@ -2578,7 +2578,7 @@ function imagecreatefromtga($filename) {} #[Pure] function imagegrabscreen() {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Captures the whole screen * @@ -2602,7 +2602,7 @@ function imagegrabscreen() {} #[Pure] function imagegrabwindow($handle, $client_area = null) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Captures a window * @@ -3204,7 +3204,7 @@ function imagegrabwindow($handle, $client_area = null) {} */ function imageaffine($image, $affine, $clip = null) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Return an image containing the affine tramsformed src image, using an optional clipping area * @link https://secure.php.net/manual/en/function.imageaffine.php @@ -3250,7 +3250,7 @@ function imageaffinematrixget ($type, $options = null) {} */ function imagecrop ($image, $rect) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Crop an image using the given coordinates and size, x, y, width and height * @link https://secure.php.net/manual/en/function.imagecrop.php @@ -3285,7 +3285,7 @@ function imagecrop ($image, $rect) {} */ function imagecropauto ($image, $mode = IMG_CROP_DEFAULT, $threshold = .5, $color = -1) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Crop an image automatically using one of the available modes * @link https://secure.php.net/manual/en/function.imagecropauto.php @@ -3374,7 +3374,7 @@ function imagepalettetotruecolor ($image) {} */ function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_FIXED) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * @since 5.5 * Scale an image using the given new width and height diff --git a/imap/imap.php b/imap/imap.php index a535901fb..a00379cdb 100644 --- a/imap/imap.php +++ b/imap/imap.php @@ -108,7 +108,7 @@ function imap_num_recent ($imap_stream) {} */ function imap_headers ($imap_stream) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Read the header of the message * @link https://php.net/manual/en/function.imap-headerinfo.php diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index 15b4629ad..c0942d055 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -828,7 +828,7 @@ function mb_convert_variables ($to_encoding, $from_encoding, &$var, &...$vars) { #[Pure] function mb_encode_numericentity ($string, array $map, $encoding = null, $hex = false) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Decode HTML numeric string reference to character * @link https://php.net/manual/en/function.mb-decode-numericentity.php diff --git a/odbc/odbc.php b/odbc/odbc.php index 2197db619..87f7ea75d 100644 --- a/odbc/odbc.php +++ b/odbc/odbc.php @@ -217,7 +217,7 @@ function odbc_error ($connection_id = null) {} */ function odbc_errormsg ($connection_id = null) {} -#[PhpStormStubsElementAvailable("5.3","8.0")] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Prepare and execute an SQL statement * @link https://php.net/manual/en/function.odbc-exec.php diff --git a/openssl/openssl.php b/openssl/openssl.php index 7472a20fa..c4cc0ffeb 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -15,7 +15,7 @@ #[Deprecated(since: '8.0')] function openssl_pkey_free($key) { } -#[PhpStormStubsElementAvailable("5.3",'8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Generates a new private key * @link https://php.net/manual/en/function.openssl-pkey-new.php @@ -238,7 +238,7 @@ function openssl_spki_export_challenge (&$spki ) {} */ function openssl_spki_export (&$spki ) {} -#[PhpStormStubsElementAvailable("5.3","8.0")] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Parse an X.509 certificate and return a resource identifier for * it @@ -455,7 +455,7 @@ function openssl_pkcs12_export_to_file($certificate, $output_filename, $private_ */ function openssl_pkcs12_read($pkcs12, array &$certificates, $passphrase) { } -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Generates a CSR * @link https://php.net/manual/en/function.openssl-csr-new.php @@ -670,7 +670,7 @@ function openssl_csr_export($csr, &$output, $no_text = true) { } */ function openssl_csr_export_to_file($csr, $output_filename, $no_text = true) { } -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Sign a CSR with another certificate (or itself) and generate a certificate * @link https://php.net/manual/en/function.openssl-csr-sign.php @@ -873,7 +873,7 @@ function openssl_sign($data, &$signature, $private_key, $algorithm = OPENSSL_ALG */ function openssl_verify($data, $signature, $public_key, $algorithm = OPENSSL_ALGO_SHA1) { } -#[PhpStormStubsElementAvailable("5.3","8.0")] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Seal (encrypt) data * @link https://php.net/manual/en/function.openssl-seal.php @@ -909,7 +909,7 @@ function openssl_seal($data, &$sealed_data, array &$encrypted_keys, array $publi { } -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Open sealed data * @link https://php.net/manual/en/function.openssl-open.php diff --git a/pgsql/pgsql.php b/pgsql/pgsql.php index 936bba03f..55de38f73 100644 --- a/pgsql/pgsql.php +++ b/pgsql/pgsql.php @@ -1235,7 +1235,7 @@ function pg_lo_write ($large_object, $data, $len = null) {} */ function pg_lo_read_all ($large_object) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Import a large object from file * @link https://php.net/manual/en/function.pg-lo-import.php @@ -1287,7 +1287,7 @@ function pg_lo_import ($connection = null, $pathname, $object_id = null) {} */ function pg_lo_import ($connection, $pathname, $object_id = null) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Export a large object to file * @link https://php.net/manual/en/function.pg-lo-export.php diff --git a/shmop/shmop.php b/shmop/shmop.php index 2cfba183d..50af9d971 100644 --- a/shmop/shmop.php +++ b/shmop/shmop.php @@ -31,7 +31,7 @@ */ function shmop_open ($key, $mode, $permissions, $size) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create or open shared memory block * @link https://php.net/manual/en/function.shmop-open.php diff --git a/sockets/sockets.php b/sockets/sockets.php index 4dca48ced..23030ae05 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -22,7 +22,7 @@ */ function socket_addrinfo_lookup($host, $service, $hints) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * (PHP 7 >= 7.2.0)
* Get array with contents of getaddrinfo about the given hostname. @@ -54,7 +54,7 @@ function socket_addrinfo_lookup($host, $service, $hints) {} */ function socket_addrinfo_connect($addr) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a Socket resource, and connect it to the provided AddrInfo resource.
* The return value of this function may be used with the rest of the socket functions. @@ -81,7 +81,7 @@ function socket_addrinfo_connect($addr) {} */ function socket_addrinfo_bind($addr) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * (PHP 7 >= 7.2.0)
* Create a Socket resource, and bind it to the provided AddrInfo resource.
@@ -296,7 +296,7 @@ function socket_select (array &$read, array &$write, array &$except, $tv_sec, $t */ function socket_create ($domain, $type, $protocol) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create a socket (endpoint for communication) * @link https://php.net/manual/en/function.socket-create.php @@ -442,7 +442,7 @@ function socket_create ($domain, $type, $protocol) {} */ function socket_export_stream($socket) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * @param resource $socket * @return resource|false @@ -519,7 +519,7 @@ function socket_create_pair ($domain, $type, $protocol, array &$fd) {} function socket_accept ($socket) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Accepts a connection on a socket * @link https://php.net/manual/en/function.socket-accept.php @@ -546,7 +546,7 @@ function socket_accept ($socket) {} */ function socket_set_nonblock ($socket) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Sets nonblocking mode for file descriptor fd * @link https://php.net/manual/en/function.socket-set-nonblock.php @@ -570,7 +570,7 @@ function socket_set_nonblock ($socket) {} */ function socket_set_block ($socket) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Sets blocking mode on a socket resource * @link https://php.net/manual/en/function.socket-set-block.php @@ -612,7 +612,7 @@ function socket_set_block ($socket) {} */ function socket_listen ($socket, $backlog = 0) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Listens for a connection on a socket * @link https://php.net/manual/en/function.socket-listen.php @@ -654,7 +654,7 @@ function socket_listen ($socket, $backlog = 0) {} */ function socket_close ($socket) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Closes a socket resource * @link https://php.net/manual/en/function.socket-close.php @@ -694,7 +694,7 @@ function socket_close ($socket) {} */ function socket_write ($socket, $buffer, $length = 0) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Write to a socket * @link https://php.net/manual/en/function.socket-write.php @@ -754,7 +754,7 @@ function socket_write ($socket, $buffer, $length = 0) {} */ function socket_read ($socket, $length, $type = PHP_BINARY_READ) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Reads a maximum of length bytes from a socket * @link https://php.net/manual/en/function.socket-read.php @@ -1653,7 +1653,7 @@ function socket_clear_error ($socket = null) {} */ function socket_import_stream ($stream) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Import a stream * @link https://php.net/manual/en/function.socket-import-stream.php @@ -1720,7 +1720,7 @@ function socket_wsaprotocol_info_export($socket, $target_pid) {} function socket_wsaprotocol_info_import($info_id) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Imports a Socket from another Process * diff --git a/standard/standard_7.php b/standard/standard_7.php index 536579d14..4ca7eb364 100644 --- a/standard/standard_7.php +++ b/standard/standard_7.php @@ -236,7 +236,7 @@ function get_browser ($user_agent = null, $return_array = null) {} #[Pure] function crypt ($string, $salt) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * One-way string encryption (hashing) * @link https://php.net/manual/en/function.crypt.php diff --git a/standard/standard_9.php b/standard/standard_9.php index 96b71aa29..ce19ce380 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -277,7 +277,7 @@ function array_unique(array $array, $flags = SORT_STRING) { } #[Pure] function array_intersect(array $array, ...$arrays) { } -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Computes the intersection of arrays * @link https://php.net/manual/en/function.array-intersect.php @@ -459,7 +459,7 @@ function array_uintersect_uassoc(array $array1, array $array2, array $_ = null, #[Pure] function array_diff(array $array, ...$excludes) { } -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Computes the difference of arrays * @link https://php.net/manual/en/function.array-diff.php diff --git a/sysvmsg/sysvmsg.php b/sysvmsg/sysvmsg.php index c75caa636..25eb0c081 100644 --- a/sysvmsg/sysvmsg.php +++ b/sysvmsg/sysvmsg.php @@ -16,7 +16,7 @@ */ function msg_get_queue ($key, $permissions = 0666) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create or attach to a message queue * @link https://php.net/manual/en/function.msg-get-queue.php diff --git a/sysvsem/sysvsem.php b/sysvsem/sysvsem.php index 0f8bd9558..c8445bed9 100644 --- a/sysvsem/sysvsem.php +++ b/sysvsem/sysvsem.php @@ -26,7 +26,7 @@ */ function sem_get ($key, $max_acquire = 1, $permissions = 0666, $auto_release = 1) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Get a semaphore id * @link https://php.net/manual/en/function.sem-get.php diff --git a/sysvshm/sysvshm.php b/sysvshm/sysvshm.php index 9a072c7fd..40ef7e860 100644 --- a/sysvshm/sysvshm.php +++ b/sysvshm/sysvshm.php @@ -22,7 +22,7 @@ */ function shm_attach ($key, $size = null, $permissions = 0666) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Creates or open a shared memory segment * @link https://php.net/manual/en/function.shm-attach.php diff --git a/xml/xml.php b/xml/xml.php index 02a29c6d9..92eca204c 100644 --- a/xml/xml.php +++ b/xml/xml.php @@ -26,7 +26,7 @@ #[Pure] function xml_parser_create ($encoding = null) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Create an XML parser * @link https://php.net/manual/en/function.xml-parser-create.php diff --git a/zlib/zlib.php b/zlib/zlib.php index 0e509d2d8..f90d478b3 100644 --- a/zlib/zlib.php +++ b/zlib/zlib.php @@ -433,7 +433,7 @@ function ob_gzhandler ($data, $flags) {} #[Pure] function deflate_init ($encoding, $options = array()) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Initialize an incremental deflate context * @link https://php.net/manual/en/function.deflate-init.php @@ -506,7 +506,7 @@ function deflate_add ($context, $data, $flush_mode = ZLIB_SYNC_FLUSH) {} #[Pure] function inflate_init ($encoding, $options = array()) {} -#[PhpStormStubsElementAvailable('5.3','8.0')] +#[PhpStormStubsElementAvailable('5.3','7.4')] /** * Initialize an incremental inflate context * @link https://php.net/manual/en/function.inflate-init.php From f5d06efdc88094159e14f157df52f8e45f69fa99 Mon Sep 17 00:00:00 2001 From: "Maxim.Kolmakov" Date: Wed, 11 Nov 2020 17:26:46 +0100 Subject: [PATCH 3/3] Simplify annotation + fix wrong to values --- PDO/PDO.php | 4 +-- curl/curl.php | 6 ++--- enchant/enchant.php | 8 +++--- gd/gd.php | 60 ++++++++++++++++++++--------------------- imap/imap.php | 2 +- mbstring/mbstring.php | 4 +-- odbc/odbc.php | 2 +- openssl/openssl.php | 12 ++++----- pgsql/pgsql.php | 4 +-- shmop/shmop.php | 2 +- sockets/sockets.php | 28 +++++++++---------- standard/standard_7.php | 2 +- standard/standard_9.php | 4 +-- sysvmsg/sysvmsg.php | 2 +- sysvsem/sysvsem.php | 2 +- sysvshm/sysvshm.php | 2 +- xml/xml.php | 2 +- zlib/zlib.php | 4 +-- 18 files changed, 75 insertions(+), 75 deletions(-) diff --git a/PDO/PDO.php b/PDO/PDO.php index c2efd9243..a18c16ec9 100644 --- a/PDO/PDO.php +++ b/PDO/PDO.php @@ -978,7 +978,7 @@ public function setAttribute ($attribute, $value) {} */ public function exec ($statement) {} - #[PhpStormStubsElementAvailable('5.3','7.4')] + #[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
* Executes an SQL statement, returning a result set as a PDOStatement object @@ -1572,7 +1572,7 @@ public function columnCount () {} */ public function getColumnMeta ($column) {} - #[PhpStormStubsElementAvailable('5.3','7.4')] + #[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
* Set the default fetch mode for this statement diff --git a/curl/curl.php b/curl/curl.php index d2c3d7709..ca9083d26 100644 --- a/curl/curl.php +++ b/curl/curl.php @@ -90,7 +90,7 @@ public function __wakeup() { */ function curl_init ($url = null) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Initialize a cURL session * @link https://php.net/manual/en/function.curl-init.php @@ -2178,7 +2178,7 @@ function curl_share_close ($share_handle) {} */ function curl_share_init () {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 5 >=5.5.0)
* Initialize a cURL share handle @@ -2403,7 +2403,7 @@ function curl_close ($handle) {} */ function curl_multi_init () {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Returns a new cURL multi handle * @link https://php.net/manual/en/function.curl-multi-init.php diff --git a/enchant/enchant.php b/enchant/enchant.php index 140994b78..9292f0941 100644 --- a/enchant/enchant.php +++ b/enchant/enchant.php @@ -4,7 +4,7 @@ use JetBrains\PhpStorm\Deprecated; use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; -#[PhpStormStubsElementAvailable("8.0")] +#[PhpStormStubsElementAvailable('8.0')] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* create a new broker object capable of requesting @@ -13,7 +13,7 @@ */ function enchant_broker_init () {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* create a new broker object capable of requesting @@ -77,7 +77,7 @@ function enchant_broker_get_dict_path ($broker, $dict_type) {} */ function enchant_broker_list_dicts ($broker) {} -#[PhpStormStubsElementAvailable('5.3', '8.0')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* create a new dictionary using a tag @@ -122,7 +122,7 @@ function enchant_broker_request_dict ($broker, $tag) {} */ function enchant_broker_request_pwl_dict ($broker, $filename) {} -#[PhpStormStubsElementAvailable('5.3', '8.0')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )
* creates a dictionary using a PWL file diff --git a/gd/gd.php b/gd/gd.php index fb050e147..16277d200 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -224,7 +224,7 @@ function imagecolorallocate ($image, $red, $green, $blue) {} */ function imagepalettecopy ($destination, $source) {} -#[PhpStormStubsElementAvailable("8.0")] +#[PhpStormStubsElementAvailable('8.0')] /** * Create a new image from the image stream in the string * @link https://php.net/manual/en/function.imagecreatefromstring.php @@ -238,7 +238,7 @@ function imagepalettecopy ($destination, $source) {} #[Pure] function imagecreatefromstring ($image) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from the image stream in the string * @link https://php.net/manual/en/function.imagecreatefromstring.php @@ -515,7 +515,7 @@ function imagecopymergegray ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $ */ function imagecopyresized ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {} -#[PhpStormStubsElementAvailable("8.0")] +#[PhpStormStubsElementAvailable('8.0')] /** * Create a new palette based image * @link https://php.net/manual/en/function.imagecreate.php @@ -530,7 +530,7 @@ function imagecopyresized ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_ #[Pure] function imagecreate ($width, $height) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new palette based image * @link https://php.net/manual/en/function.imagecreate.php @@ -562,7 +562,7 @@ function imagecreate($width, $height) #[Pure] function imagecreatetruecolor ($width, $height) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new true color image * @link https://php.net/manual/en/function.imagecreatetruecolor.php @@ -588,7 +588,7 @@ function imagecreatetruecolor ($width, $height) {} #[Pure] function imageistruecolor ($image) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Finds whether an image is a truecolor image * @link https://php.net/manual/en/function.imageistruecolor.php @@ -835,7 +835,7 @@ function imagecolorexactalpha ($image, $red, $green, $blue, $alpha) {} */ function imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Rotate an image with a given angle * @link https://php.net/manual/en/function.imagerotate.php @@ -929,7 +929,7 @@ function imagesetstyle ($image, array $style) {} */ function imagecreatefrompng ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefrompng.php @@ -951,7 +951,7 @@ function imagecreatefrompng ($filename) {} */ function imagecreatefromgif ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromgif.php @@ -974,7 +974,7 @@ function imagecreatefromgif ($filename) {} function imagecreatefromjpeg ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromjpeg.php @@ -996,7 +996,7 @@ function imagecreatefromjpeg ($filename) {} */ function imagecreatefromwbmp ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromwbmp.php @@ -1019,7 +1019,7 @@ function imagecreatefromwbmp ($filename) {} */ function imagecreatefromwebp ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromwebp.php @@ -1042,7 +1042,7 @@ function imagecreatefromwebp ($filename) {} */ function imagecreatefromxbm ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromxbm.php @@ -1064,7 +1064,7 @@ function imagecreatefromxbm ($filename) {} */ function imagecreatefromxpm ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from file or URL * @link https://php.net/manual/en/function.imagecreatefromxpm.php @@ -1086,7 +1086,7 @@ function imagecreatefromxpm ($filename) {} */ function imagecreatefromgd ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from GD file or URL * @link https://php.net/manual/en/function.imagecreatefromgd.php @@ -1097,7 +1097,7 @@ function imagecreatefromgd ($filename) {} */ function imagecreatefromgd ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2.php @@ -1108,7 +1108,7 @@ function imagecreatefromgd ($filename) {} */ function imagecreatefromgd2 ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2.php @@ -1142,7 +1142,7 @@ function imagecreatefromgd2 ($filename) {} */ function imagecreatefromgd2part ($filename, $srcX, $srcY, $width, $height) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a new image from a given part of GD2 file or URL * @link https://php.net/manual/en/function.imagecreatefromgd2part.php @@ -1350,7 +1350,7 @@ function imagefill ($image, $x, $y, $color) {} */ function imagefilledpolygon ($image, array $points, $num_points, $color) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Draw a filled polygon * @link https://php.net/manual/en/function.imagefilledpolygon.php @@ -1559,7 +1559,7 @@ function imageloadfont ($file) {} */ function imagepolygon ($image, array $points, $num_points, $color) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Draws a polygon * @link https://php.net/manual/en/function.imagepolygon.php @@ -2098,7 +2098,7 @@ function imagefttext ($image, $size, $angle, $x, $y, $color, $fontfile, $text, $ */ function imagepsloadfont ($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Load a PostScript Type 1 font from file * @link https://php.net/manual/en/function.imagepsloadfont.php @@ -2496,7 +2496,7 @@ function imagegetclip ($im) {} */ function imageopenpolygon ($image , $points, $num_points, $color) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * imageopenpolygon() draws an open polygon on the given image. Contrary to {@see imagepolygon()}, no line is drawn between the last and the first point. * @param resource|GdImage $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}. @@ -2527,7 +2527,7 @@ function imageopenpolygon ($image , $points, $num_points, $color) {} */ function imagecreatefrombmp($filename){} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * imagecreatefrombmp() returns an image identifier representing the image obtained from the given filename. * TIP A URL can be used as a filename with this function if the fopen wrappers have been enabled. See {@see fopen()} for more details on how to specify the filename. See the Supported Protocols and Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide. @@ -2560,7 +2560,7 @@ function imagebmp ($image, $to = null, $compressed = true) {} */ function imagecreatefromtga($filename) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * @param string $filename * @return resource|false @@ -2578,7 +2578,7 @@ function imagecreatefromtga($filename) {} #[Pure] function imagegrabscreen() {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Captures the whole screen * @@ -2602,7 +2602,7 @@ function imagegrabscreen() {} #[Pure] function imagegrabwindow($handle, $client_area = null) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Captures a window * @@ -3204,7 +3204,7 @@ function imagegrabwindow($handle, $client_area = null) {} */ function imageaffine($image, $affine, $clip = null) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Return an image containing the affine tramsformed src image, using an optional clipping area * @link https://secure.php.net/manual/en/function.imageaffine.php @@ -3250,7 +3250,7 @@ function imageaffinematrixget ($type, $options = null) {} */ function imagecrop ($image, $rect) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Crop an image using the given coordinates and size, x, y, width and height * @link https://secure.php.net/manual/en/function.imagecrop.php @@ -3285,7 +3285,7 @@ function imagecrop ($image, $rect) {} */ function imagecropauto ($image, $mode = IMG_CROP_DEFAULT, $threshold = .5, $color = -1) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Crop an image automatically using one of the available modes * @link https://secure.php.net/manual/en/function.imagecropauto.php @@ -3374,7 +3374,7 @@ function imagepalettetotruecolor ($image) {} */ function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_FIXED) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * @since 5.5 * Scale an image using the given new width and height diff --git a/imap/imap.php b/imap/imap.php index a00379cdb..33df0a3eb 100644 --- a/imap/imap.php +++ b/imap/imap.php @@ -108,7 +108,7 @@ function imap_num_recent ($imap_stream) {} */ function imap_headers ($imap_stream) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Read the header of the message * @link https://php.net/manual/en/function.imap-headerinfo.php diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index c0942d055..d57efc0ea 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -187,7 +187,7 @@ function mb_detect_order ($encoding = null) {} */ function mb_substitute_character ($substitute_character = null) {} -#[PhpStormStubsElementAvailable('5.3', '8.0')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Parse GET/POST/COOKIE data and set global variable * @link https://php.net/manual/en/function.mb-parse-str.php @@ -828,7 +828,7 @@ function mb_convert_variables ($to_encoding, $from_encoding, &$var, &...$vars) { #[Pure] function mb_encode_numericentity ($string, array $map, $encoding = null, $hex = false) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Decode HTML numeric string reference to character * @link https://php.net/manual/en/function.mb-decode-numericentity.php diff --git a/odbc/odbc.php b/odbc/odbc.php index 87f7ea75d..5002b26b6 100644 --- a/odbc/odbc.php +++ b/odbc/odbc.php @@ -217,7 +217,7 @@ function odbc_error ($connection_id = null) {} */ function odbc_errormsg ($connection_id = null) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Prepare and execute an SQL statement * @link https://php.net/manual/en/function.odbc-exec.php diff --git a/openssl/openssl.php b/openssl/openssl.php index c4cc0ffeb..dcb783023 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -15,7 +15,7 @@ #[Deprecated(since: '8.0')] function openssl_pkey_free($key) { } -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Generates a new private key * @link https://php.net/manual/en/function.openssl-pkey-new.php @@ -238,7 +238,7 @@ function openssl_spki_export_challenge (&$spki ) {} */ function openssl_spki_export (&$spki ) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Parse an X.509 certificate and return a resource identifier for * it @@ -455,7 +455,7 @@ function openssl_pkcs12_export_to_file($certificate, $output_filename, $private_ */ function openssl_pkcs12_read($pkcs12, array &$certificates, $passphrase) { } -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Generates a CSR * @link https://php.net/manual/en/function.openssl-csr-new.php @@ -670,7 +670,7 @@ function openssl_csr_export($csr, &$output, $no_text = true) { } */ function openssl_csr_export_to_file($csr, $output_filename, $no_text = true) { } -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Sign a CSR with another certificate (or itself) and generate a certificate * @link https://php.net/manual/en/function.openssl-csr-sign.php @@ -873,7 +873,7 @@ function openssl_sign($data, &$signature, $private_key, $algorithm = OPENSSL_ALG */ function openssl_verify($data, $signature, $public_key, $algorithm = OPENSSL_ALGO_SHA1) { } -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Seal (encrypt) data * @link https://php.net/manual/en/function.openssl-seal.php @@ -909,7 +909,7 @@ function openssl_seal($data, &$sealed_data, array &$encrypted_keys, array $publi { } -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Open sealed data * @link https://php.net/manual/en/function.openssl-open.php diff --git a/pgsql/pgsql.php b/pgsql/pgsql.php index 55de38f73..547000c39 100644 --- a/pgsql/pgsql.php +++ b/pgsql/pgsql.php @@ -1235,7 +1235,7 @@ function pg_lo_write ($large_object, $data, $len = null) {} */ function pg_lo_read_all ($large_object) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Import a large object from file * @link https://php.net/manual/en/function.pg-lo-import.php @@ -1287,7 +1287,7 @@ function pg_lo_import ($connection = null, $pathname, $object_id = null) {} */ function pg_lo_import ($connection, $pathname, $object_id = null) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Export a large object to file * @link https://php.net/manual/en/function.pg-lo-export.php diff --git a/shmop/shmop.php b/shmop/shmop.php index 50af9d971..4b153f393 100644 --- a/shmop/shmop.php +++ b/shmop/shmop.php @@ -31,7 +31,7 @@ */ function shmop_open ($key, $mode, $permissions, $size) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create or open shared memory block * @link https://php.net/manual/en/function.shmop-open.php diff --git a/sockets/sockets.php b/sockets/sockets.php index 23030ae05..3f02c6614 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -22,7 +22,7 @@ */ function socket_addrinfo_lookup($host, $service, $hints) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 7 >= 7.2.0)
* Get array with contents of getaddrinfo about the given hostname. @@ -54,7 +54,7 @@ function socket_addrinfo_lookup($host, $service, $hints) {} */ function socket_addrinfo_connect($addr) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a Socket resource, and connect it to the provided AddrInfo resource.
* The return value of this function may be used with the rest of the socket functions. @@ -81,7 +81,7 @@ function socket_addrinfo_connect($addr) {} */ function socket_addrinfo_bind($addr) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * (PHP 7 >= 7.2.0)
* Create a Socket resource, and bind it to the provided AddrInfo resource.
@@ -296,7 +296,7 @@ function socket_select (array &$read, array &$write, array &$except, $tv_sec, $t */ function socket_create ($domain, $type, $protocol) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create a socket (endpoint for communication) * @link https://php.net/manual/en/function.socket-create.php @@ -442,7 +442,7 @@ function socket_create ($domain, $type, $protocol) {} */ function socket_export_stream($socket) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * @param resource $socket * @return resource|false @@ -519,7 +519,7 @@ function socket_create_pair ($domain, $type, $protocol, array &$fd) {} function socket_accept ($socket) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Accepts a connection on a socket * @link https://php.net/manual/en/function.socket-accept.php @@ -546,7 +546,7 @@ function socket_accept ($socket) {} */ function socket_set_nonblock ($socket) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Sets nonblocking mode for file descriptor fd * @link https://php.net/manual/en/function.socket-set-nonblock.php @@ -570,7 +570,7 @@ function socket_set_nonblock ($socket) {} */ function socket_set_block ($socket) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Sets blocking mode on a socket resource * @link https://php.net/manual/en/function.socket-set-block.php @@ -612,7 +612,7 @@ function socket_set_block ($socket) {} */ function socket_listen ($socket, $backlog = 0) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Listens for a connection on a socket * @link https://php.net/manual/en/function.socket-listen.php @@ -654,7 +654,7 @@ function socket_listen ($socket, $backlog = 0) {} */ function socket_close ($socket) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Closes a socket resource * @link https://php.net/manual/en/function.socket-close.php @@ -694,7 +694,7 @@ function socket_close ($socket) {} */ function socket_write ($socket, $buffer, $length = 0) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Write to a socket * @link https://php.net/manual/en/function.socket-write.php @@ -754,7 +754,7 @@ function socket_write ($socket, $buffer, $length = 0) {} */ function socket_read ($socket, $length, $type = PHP_BINARY_READ) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Reads a maximum of length bytes from a socket * @link https://php.net/manual/en/function.socket-read.php @@ -1653,7 +1653,7 @@ function socket_clear_error ($socket = null) {} */ function socket_import_stream ($stream) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Import a stream * @link https://php.net/manual/en/function.socket-import-stream.php @@ -1720,7 +1720,7 @@ function socket_wsaprotocol_info_export($socket, $target_pid) {} function socket_wsaprotocol_info_import($info_id) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Imports a Socket from another Process * diff --git a/standard/standard_7.php b/standard/standard_7.php index 4ca7eb364..1da6ddace 100644 --- a/standard/standard_7.php +++ b/standard/standard_7.php @@ -236,7 +236,7 @@ function get_browser ($user_agent = null, $return_array = null) {} #[Pure] function crypt ($string, $salt) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * One-way string encryption (hashing) * @link https://php.net/manual/en/function.crypt.php diff --git a/standard/standard_9.php b/standard/standard_9.php index ce19ce380..c2c6cb3e6 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -277,7 +277,7 @@ function array_unique(array $array, $flags = SORT_STRING) { } #[Pure] function array_intersect(array $array, ...$arrays) { } -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Computes the intersection of arrays * @link https://php.net/manual/en/function.array-intersect.php @@ -459,7 +459,7 @@ function array_uintersect_uassoc(array $array1, array $array2, array $_ = null, #[Pure] function array_diff(array $array, ...$excludes) { } -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Computes the difference of arrays * @link https://php.net/manual/en/function.array-diff.php diff --git a/sysvmsg/sysvmsg.php b/sysvmsg/sysvmsg.php index 25eb0c081..c7906242f 100644 --- a/sysvmsg/sysvmsg.php +++ b/sysvmsg/sysvmsg.php @@ -16,7 +16,7 @@ */ function msg_get_queue ($key, $permissions = 0666) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create or attach to a message queue * @link https://php.net/manual/en/function.msg-get-queue.php diff --git a/sysvsem/sysvsem.php b/sysvsem/sysvsem.php index c8445bed9..5502e767a 100644 --- a/sysvsem/sysvsem.php +++ b/sysvsem/sysvsem.php @@ -26,7 +26,7 @@ */ function sem_get ($key, $max_acquire = 1, $permissions = 0666, $auto_release = 1) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Get a semaphore id * @link https://php.net/manual/en/function.sem-get.php diff --git a/sysvshm/sysvshm.php b/sysvshm/sysvshm.php index 40ef7e860..be756ccc3 100644 --- a/sysvshm/sysvshm.php +++ b/sysvshm/sysvshm.php @@ -22,7 +22,7 @@ */ function shm_attach ($key, $size = null, $permissions = 0666) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Creates or open a shared memory segment * @link https://php.net/manual/en/function.shm-attach.php diff --git a/xml/xml.php b/xml/xml.php index 92eca204c..e14e12e46 100644 --- a/xml/xml.php +++ b/xml/xml.php @@ -26,7 +26,7 @@ #[Pure] function xml_parser_create ($encoding = null) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Create an XML parser * @link https://php.net/manual/en/function.xml-parser-create.php diff --git a/zlib/zlib.php b/zlib/zlib.php index f90d478b3..cc703149e 100644 --- a/zlib/zlib.php +++ b/zlib/zlib.php @@ -433,7 +433,7 @@ function ob_gzhandler ($data, $flags) {} #[Pure] function deflate_init ($encoding, $options = array()) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Initialize an incremental deflate context * @link https://php.net/manual/en/function.deflate-init.php @@ -506,7 +506,7 @@ function deflate_add ($context, $data, $flush_mode = ZLIB_SYNC_FLUSH) {} #[Pure] function inflate_init ($encoding, $options = array()) {} -#[PhpStormStubsElementAvailable('5.3','7.4')] +#[PhpStormStubsElementAvailable(to: '7.4')] /** * Initialize an incremental inflate context * @link https://php.net/manual/en/function.inflate-init.php