diff --git a/Core/Core.php b/Core/Core.php index a3e88055d..04459d95b 100644 --- a/Core/Core.php +++ b/Core/Core.php @@ -152,7 +152,7 @@ function strncasecmp ($str1, $str2, $len) {} * false. * @since 4.0 * @since 5.0 - * @deprecated 7.2 + * @deprecated 7.2.0 Use a foreach loop instead. */ function each (array &$array) {} @@ -750,7 +750,7 @@ function get_defined_vars () {} * @return string a unique function name as a string, or false on error. * @since 4.0.1 * @since 5.0 - * @deprecated 7.2 + * @deprecated 7.2.0 Use anonymous functions instead. */ function create_function ($args, $code) {} diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index 9fd9405e2..de6622693 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -3547,6 +3547,7 @@ final class PhpStormStubsMap 'oci_parse' => 'oci8/oci8.php', 'oci_password_change' => 'oci8/oci8.php', 'oci_pconnect' => 'oci8/oci8.php', + 'oci_register_taf_callback' => 'oci8/oci8.php', 'oci_result' => 'oci8/oci8.php', 'oci_rollback' => 'oci8/oci8.php', 'oci_server_version' => 'oci8/oci8.php', @@ -3557,6 +3558,7 @@ final class PhpStormStubsMap 'oci_set_module_name' => 'oci8/oci8.php', 'oci_set_prefetch' => 'oci8/oci8.php', 'oci_statement_type' => 'oci8/oci8.php', + 'oci_unregister_taf_callback' => 'oci8/oci8.php', 'ocibindbyname' => 'oci8/oci8.php', 'ocicancel' => 'oci8/oci8.php', 'ocicloselob' => 'oci8/oci8.php', @@ -4157,6 +4159,10 @@ final class PhpStormStubsMap 'snmpwalk' => 'snmp/snmp.php', 'snmpwalkoid' => 'snmp/snmp.php', 'socket_accept' => 'sockets/sockets.php', + 'socket_addrinfo_bind' => 'sockets/sockets.php', + 'socket_addrinfo_connect' => 'sockets/sockets.php', + 'socket_addrinfo_explain' => 'sockets/sockets.php', + 'socket_addrinfo_lookup' => 'sockets/sockets.php', 'socket_bind' => 'sockets/sockets.php', 'socket_clear_error' => 'sockets/sockets.php', 'socket_close' => 'sockets/sockets.php', diff --git a/exif/exif.php b/exif/exif.php index 4e0a84938..012912f71 100644 --- a/exif/exif.php +++ b/exif/exif.php @@ -5,9 +5,10 @@ /** * Reads the EXIF headers from JPEG or TIFF * @link https://php.net/manual/en/function.exif-read-data.php - * @param string $filename
- * The name of the image file being read. This cannot be an - * URL. + * @param string|resource $stream
+ * The location of the image file. This cannot be an URL. + * Since 7.2.0 this can either be a path to the file (stream wrappers are also supported as usual) + * or a stream resource. *
* @param string $sections [optional]* Is a comma separated list of sections that need to be present in file @@ -77,7 +78,7 @@ * @since 4.2.0 * @since 5.0 */ -function exif_read_data ($filename, $sections = null, $arrays = false, $thumbnail = false) {} +function exif_read_data ($stream, $sections = null, $arrays = false, $thumbnail = false) {} /** * Alias of exif_read_data @@ -88,7 +89,7 @@ function exif_read_data ($filename, $sections = null, $arrays = false, $thumbnai * @param $thumbnail [optional] * @since 4.0.1 * @since 5.0 - * @deprecated 7.2 + * @deprecated 7.2.0 Use {@see exif_read_data()} instead. */ function read_exif_data ($filename, $sections = null, $arrays = false, $thumbnail = false) {} @@ -108,9 +109,10 @@ function exif_tagname ($index) {} /** * Retrieve the embedded thumbnail of a TIFF or JPEG image * @link https://php.net/manual/en/function.exif-thumbnail.php - * @param string $filename
- * The name of the image file being read. This image contains an - * embedded thumbnail. + * @param string|resource $stream
+ * The location of the image file. This cannot be an URL. + * Since 7.2.0 this can either be a path to the file (stream wrappers are also supported as usual) + * or a stream resource. *
* @param int $width [optional]
* The return width of the returned thumbnail.
@@ -127,7 +129,7 @@ function exif_tagname ($index) {}
* @since 4.2.0
* @since 5.0
*/
-function exif_thumbnail ($filename, &$width = null, &$height = null, &$imagetype = null) {}
+function exif_thumbnail ($stream, &$width = null, &$height = null, &$imagetype = null) {}
/**
* Determine the type of an image
diff --git a/gd/gd.php b/gd/gd.php
index 9e3480f98..bda85770c 100644
--- a/gd/gd.php
+++ b/gd/gd.php
@@ -844,7 +844,8 @@ function imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $sr
function imagerotate ($image, $angle, $bgd_color, $ignore_transparent = null) {}
/**
- * Should antialias functions be used or not
+ * Should antialias functions be used or not.
+ * Before 7.2.0 it's only available if PHP iscompiled with the bundled version of the GD library.
* @link https://php.net/manual/en/function.imageantialias.php
* @param resource $image
* @param bool $enabled
@@ -1129,7 +1130,8 @@ function imagejpeg ($image, $filename = null, $quality = null) {}
function imagewbmp ($image, $filename = null, $foreground = null) {}
/**
- * Output GD image to browser or file
+ * Output GD image to browser or file.
+ * Since 7.2.0 allows to output truecolor images.
* @link https://php.net/manual/en/function.imagegd.php
* @param resource $image
* @param string $filename [optional]
diff --git a/gmp/gmp.php b/gmp/gmp.php index f2a9fed93..c5689e0d1 100644 --- a/gmp/gmp.php +++ b/gmp/gmp.php @@ -532,6 +532,7 @@ function gmp_sign ($a) {} * @return resource|GMP A random GMP number. * @since 4.0.4 * @since 5.0 + * @deprecated 7.2.0 Use {@see gmp_random_bits()} or {@see gmp_random_range()} instead. */ function gmp_random ($limiter = 20) {} diff --git a/hash/hash.php b/hash/hash.php index 4f86d818c..42e0d4aef 100644 --- a/hash/hash.php +++ b/hash/hash.php @@ -57,7 +57,8 @@ function hash_file ($algo, $filename, $raw_output = false) {} * Generate a keyed hash value using the HMAC method * @link https://php.net/manual/en/function.hash-hmac.php * @param string $algo
- * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See hash_algos for a list of supported algorithms.
+ * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See hash_algos for a list of supported algorithms.
+ * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
*
* Message to be hashed. @@ -80,7 +81,8 @@ function hash_hmac ($algo, $data, $key, $raw_output = false) {} * Generate a keyed hash value using the HMAC method and the contents of a given file * @link https://php.net/manual/en/function.hash-hmac-file.php * @param string $algo
- * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See hash_algos for a list of supported algorithms.
+ * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See hash_algos for a list of supported algorithms.
+ * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
*
* URL describing location of file to be hashed; Supports fopen wrappers. @@ -103,7 +105,8 @@ function hash_hmac_file ($algo, $filename, $key, $raw_output = false) {} * Initialize an incremental hashing context * @link https://php.net/manual/en/function.hash-init.php * @param string $algo
- * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..). For a list of supported algorithms see hash_algos.
+ * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..). For a list of supported algorithms see hash_algos.
+ * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
*
* Optional settings for hash generation, currently supports only one option: @@ -239,12 +242,27 @@ function hash_hmac_algos() {} /** * Generate a PBKDF2 key derivation of a supplied password * @link https://php.net/manual/en/function.hash-pbkdf2.php - * @param $algo - * @param $password - * @param $salt - * @param $iterations - * @param $length [optional] - * @param $raw_output [optional] + * @param string $algo
+ * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) See hash_algos for a list of supported algorithms.
+ * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled.
+ *
+ * The password to use for the derivation. + *
+ * @param string $salt+ * The salt to use for the derivation. This value should be generated randomly. + *
+ * @param int $iterations+ * The number of internal iterations to perform for the derivation. + *
+ * @param int $length [optional]
+ * The length of the output string. If raw_output is TRUE this corresponds to the byte-length of the derived key,
+ * if raw_output is FALSE this corresponds to twice the byte-length of the derived key (as every byte of the key is returned as two hexits).
+ * If 0 is passed, the entire output of the supplied algorithm is used.
+ *
+ * When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. + *
* @return mixed a string containing the derived key as lowercase hexits unless * raw_output is set to TRUE in which case the raw * binary representation of the derived key is returned. diff --git a/intl/intl.php b/intl/intl.php index 8b26872fe..88bc862d6 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -6072,9 +6072,10 @@ function intl_error_name($error_code) { } define ('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); /** - * Use IDNA 2003 algorithm in idn_to_utf8 and - * idn_to_ascii. This is the default. + * Use IDNA 2003 algorithm in {@see idn_to_utf8} and + * {@see idn_to_ascii}. This is the default. * @link https://php.net/manual/en/intl.constants.php + * @deprecated 7.2.0 Use {@see INTL_IDNA_VARIANT_UTS46} instead. */ define ('INTL_IDNA_VARIANT_2003', 0); diff --git a/json/json.php b/json/json.php index 297b69c4c..f9cb1695b 100644 --- a/json/json.php +++ b/json/json.php @@ -111,11 +111,12 @@ function json_encode ($value, $options = 0, $depth = 512) {} * User specified recursion depth. * * @param int $options [optional]
- * Bitmask of JSON decode options. Currently only
- * JSON_BIGINT_AS_STRING
- * is supported (default is to cast large integers as floats)
- *
- * JSON_THROW_ON_ERROR when passed this flag, the error behaviour of these functions is changed. The global error state is left untouched, and if an error occurs that would otherwise set it, these functions instead throw a JsonException
+ * Bitmask of JSON decode options:
+ * {@see JSON_BIGINT_AS_STRING} decodes large integers as their original string value.
+ * {@see JSON_INVALID_UTF8_IGNORE} ignores invalid UTF-8 characters,
+ * {@see JSON_INVALID_UTF8_SUBSTITUTE} converts invalid UTF-8 characters to \0xfffd,
+ * {@see JSON_OBJECT_AS_ARRAY} decodes JSON objects as PHP array, since 7.2.0 used by default if $assoc parameter is null,
+ * {@see JSON_THROW_ON_ERROR} when passed this flag, the error behaviour of these functions is changed. The global error state is left untouched, and if an error occurs that would otherwise set it, these functions instead throw a JsonException
*
* The mail addresses being sent to. Multiple * recipients may be specified by putting a comma between each - * address in to. + * address in to. * This parameter is not automatically encoded. *
* @param string $subject@@ -873,9 +873,10 @@ function mb_decode_numericentity ($str, array $convmap, $encoding = null) {} * @param string $message
* The message of the mail. *
- * @param string $additional_headers [optional]- * additional_headers is inserted at - * the end of the header. This is typically used to add extra + * @param string|array $additional_headers [optional]
+ * String or array to be inserted at the end of the email header.
+ * Since 7.2.0 accepts an array. Its keys are the header names and its values are the respective header values.
+ * This is typically used to add extra
* headers. Multiple extra headers are separated with a
* newline ("\n").
*
+ * An Oracle connection identifier. + *
+ * @param mixed $callbackFn [optional]
+ * A user-defined callback to register for Oracle TAF. It can be a string of the function name or a Closure (anonymous function).
+ * The interface of a TAF user-defined callback function is as follows:
+ * userCallbackFn ( resource $connection , int $event , int $type ) : int
+ * See the parameter description and an example on OCI8 Transparent Application Failover (TAF) Support page.
+ *
+ * An Oracle connection identifier. + *
+ * @return bool TRUE on success or FALSE on failure. + * @since 7.2.0 + */ +function oci_unregister_taf_callback($connection) {} + /** * (PHP 5, PECL OCI8 >= 1.1.0)
* The session name references the name of the session, which is
@@ -26,7 +27,8 @@
function session_name ($name = null) {}
/**
- * Get and/or set the current session module
+ * Get and/or set the current session module.
+ * Since 7.2.0 it is forbidden to set the module name to "user".
* @link https://php.net/manual/en/function.session-module-name.php
* @param string $module [optional]
* If module is specified, that module will be @@ -207,7 +209,7 @@ function session_destroy () {} /** * Free all session variables * @link https://php.net/manual/en/function.session-unset.php - * @return void + * @return void|bool since 7.2.0 returns true on success or false on failure. * @since 4.0 * @since 5.0 */ @@ -383,7 +385,7 @@ function session_cache_expire ($new_cache_expire = null) {} * httponly * flag when setting the session cookie. *
- * @return void + * @return void|bool since 7.2.0 returns true on success or false on failure. * @since 4.0 * @since 5.0 */ @@ -412,7 +414,7 @@ function session_get_cookie_params () {} /** * Write session data and end session * @link https://php.net/manual/en/function.session-write-close.php - * @return void + * @return void|bool since 7.2.0 returns true on success or false on failure. * @since 4.0.4 * @since 5.0 */ @@ -421,6 +423,7 @@ function session_write_close () {} /** * Alias of session_write_close * @link https://php.net/manual/en/function.session-commit.php + * @return void|bool since 7.2.0 returns true on success or false on failure. * @since 4.4.0 * @since 5.0 */ @@ -440,7 +443,7 @@ function session_status () {} * (PHP 5 >= 5.6.0)+ * 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 array of AddrInfo resource handles that can be used with the other socket_addrinfo functions. + * @since 7.2.0 + */ +function socket_addrinfo_lookup($host, $service, $hints) {} + +/** + * (PHP 7 >= 7.2.0)+ * Resource created from {@see socket_addrinfo_lookup()} + *
+ * @return resource Socket resource on success or NULL on failure. + */ +function socket_addrinfo_connect($addr) {} + +/** + * (PHP 7 >= 7.2.0)+ * Resource created from {@see socket_addrinfo_lookup()} + *
+ * @return resource Socket resource on success or NULL on failure. + */ +function socket_addrinfo_bind($addr) {} + +/** + * (PHP 7 >= 7.2.0)+ * Resource created from {@see socket_addrinfo_lookup()} + *
+ * @return array containing the fields in the addrinfo structure. + */ +function socket_addrinfo_explain($addr) {} + /** * Runs the select() system call on the given arrays of sockets with a specified timeout * @link https://php.net/manual/en/function.socket-select.php diff --git a/standard/standard_2.php b/standard/standard_2.php index ea4016135..4d109d5a0 100644 --- a/standard/standard_2.php +++ b/standard/standard_2.php @@ -221,15 +221,16 @@ function ord ($string) {} * @param string $str* The input string. *
- * @param array $arr [optional]+ * @param array $result [optional]
* If the second parameter arr is present,
- * variables are stored in this variable as array elements instead.
+ * variables are stored in this variable as array elements instead.
+ * Since 7.2.0 this parameter is not optional.
*
* The increment value of the priority change. diff --git a/standard/standard_5.php b/standard/standard_5.php index ed9345757..8574752f9 100644 --- a/standard/standard_5.php +++ b/standard/standard_5.php @@ -94,6 +94,7 @@ function strval ($var) {} * "resource" * "NULL" * "unknown type" + * "resource (closed)" since 7.2.0 * @since 4.0 * @since 5.0 */ @@ -287,7 +288,7 @@ function is_string ($var) {} * @param mixed $var
* The variable being evaluated. *
- * @return bool true if var is an array, + * @return bool true if var is an array, * false otherwise. * @since 4.0 * @since 5.0 @@ -300,8 +301,8 @@ function is_array ($var) {} * @param mixed $var* The variable being evaluated. *
- * @return bool true if var is an object, - * false otherwise. + * @return bool true if var is an object, false otherwise.- * String to be inserted at the end of the email header. + * @param string|array $additional_headers [optional]
+ * String or array to be inserted at the end of the email header.
+ * Since 7.2.0 accepts an array. Its keys are the header names and its values are the respective header values.
*
* This is typically used to add extra headers (From, Cc, and Bcc). diff --git a/standard/standard_9.php b/standard/standard_9.php index 76222a394..7cf9f878b 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -799,6 +799,10 @@ function key_exists($key, $search) { } * @link https://php.net/manual/en/function.assert.php * @param mixed $assertion
* The assertion.
+ * In PHP 5, this must be either a string to be evaluated or a boolean to be tested.
+ * In PHP 7, this may also be any expression that returns a value,
+ * which will be executed and the result used to indicate whether the assertion succeeded or failed.
+ * Since 7.2.0 using string is deprecated.
*
An optional description that will be included in the failure message if the assertion fails.
diff --git a/zip/zip.php b/zip/zip.php index 80e86eb93..e8d79cd9e 100644 --- a/zip/zip.php +++ b/zip/zip.php @@ -6,7 +6,7 @@ * A file archive, compressed with Zip. * @link https://php.net/manual/en/class.ziparchive.php */ -class ZipArchive { +class ZipArchive implements Countable { /** * Create the archive if it does not exist. @@ -408,6 +408,15 @@ public function open ($filename, $flags = null) {} */ public function close () {} + /** + * (PHP 7 >= 7.2.0, PECL zip >= 1.15.0)