[phpstorm-stubs] update stubs to migration version for php 7.2

This commit is contained in:
Ivan Fedorov 2022-11-05 22:20:23 +01:00 committed by Ivan Fedorov
parent a17205e61f
commit 17eb86a454
35 changed files with 2056 additions and 53 deletions

View File

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
name: Run tests against php 7.1
name: Run tests against php 7.2
steps:
- name: Checkout
uses: actions/checkout@v2
@ -15,22 +15,22 @@ jobs:
- name: Build Docker Container
run: docker-compose -f docker-compose.yml build >/dev/null
env:
PHP_VERSION: '7.1'
PHP_VERSION: '7.2'
- name: Composer Install
run: docker-compose -f docker-compose.yml run -e PHP_VERSION='7.1' test_runner composer update
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=7.2 test_runner composer update
env:
PHP_VERSION: '7.1'
PHP_VERSION: '7.2'
- name: Dump Reflection To File
run: docker-compose -f docker-compose.yml run -e PHP_VERSION='7.1' php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=7.2 php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
env:
PHP_VERSION: '7.1'
PHP_VERSION: '7.2'
- name: Run Tests
run: docker-compose -f docker-compose.yml run -e PHP_VERSION='7.1' test_runner vendor/bin/phpunit --testsuite PHP_7.1
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=7.2 test_runner vendor/bin/phpunit --testsuite PHP_7.2
env:
PHP_VERSION: '7.1'
PHP_VERSION: '7.2'
additional:
runs-on: ubuntu-latest
name: Run cs-fixer and stubs structure tests

View File

@ -202,6 +202,12 @@ define('PHP_DEBUG', 0);
define('PHP_OS', "Linux");
/**
* The operating system family PHP was built for. Either of 'Windows', 'BSD', 'Darwin', 'Solaris', 'Linux' or 'Unknown'. Available as of PHP 7.2.0.
* @since 7.2
*/
define('PHP_OS_FAMILY', "Linux");
define('PHP_SAPI', "cli");
define('DEFAULT_INCLUDE_PATH', ".:/usr/share/php:/usr/share/pear");
@ -250,6 +256,30 @@ define('PHP_INT_MIN', -9223372036854775808);
define('PHP_INT_SIZE', 8);
/**
* Number of decimal digits that can be rounded into a float and back without precision loss. Available as of PHP 7.2.0.
* @since 7.2
*/
define('PHP_FLOAT_DIG', 15);
/**
* Smallest representable positive number x, so that x + 1.0 != 1.0. Available as of PHP 7.2.0.
* @since 7.2
*/
define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
/**
* Largest representable floating point number. Available as of PHP 7.2.0.
* @since 7.2
*/
define('PHP_FLOAT_MAX', 1.7976931348623E+308);
/**
* Smallest representable floating point number. Available as of PHP 7.2.0.
* @since 7.2
*/
define('PHP_FLOAT_MIN', 2.2250738585072E-308);
define('ZEND_MULTIBYTE', 0);
define('PHP_OUTPUT_HANDLER_START', 1);

View File

@ -69,6 +69,27 @@ class PDO
*/
public const PARAM_BOOL = 5;
/**
* Flag to denote a string uses the national character set.
* @since 7.2
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str-natl
*/
public const PARAM_STR_NATL = 1073741824;
/**
* Flag to denote a string uses the regular character set.
* @since 7.2
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str-char
*/
public const PARAM_STR_CHAR = 536870912;
/**
* Sets the default string parameter type, this can be one of PDO::PARAM_STR_NATL and PDO::PARAM_STR_CHAR.
* @since 7.2
* @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-default-str-param
*/
public const ATTR_DEFAULT_STR_PARAM = 21;
/**
* Specifies that a function created with PDO::sqliteCreateFunction() is deterministic, i.e. it always returns the same result given the same inputs within a single SQL statement.
* @since 7.1.4
@ -1308,7 +1329,7 @@ class PDO
* with fields message and pid, otherwise <b>FALSE</b>.
* @since 5.6
*/
public function pgsqlGetNotify($fetchMode = PDO::FETCH_LAZY, $timeoutMilliseconds = 0) {}
public function pgsqlGetNotify(int $fetchMode = PDO::FETCH_LAZY, int $timeoutMilliseconds = 0) {}
/**
* (PHP 5 >= 5.6.0, PHP 7, PHP 8)<br/>
@ -1317,7 +1338,7 @@ class PDO
* @return int The server's PID.
* @since 5.6
*/
public function pgsqlGetPid() {}
public function pgsqlGetPid(): int {}
}
/**

View File

@ -80,6 +80,7 @@ const CLASSES = array (
'GMP' => 'gmp/gmp.php',
'Generator' => 'standard/_types.php',
'GlobIterator' => 'SPL/SPL_c1.php',
'HashContext' => 'hash/hash.php',
'InfiniteIterator' => 'SPL/SPL.php',
'IntlBreakIterator' => 'intl/intl.php',
'IntlCalendar' => 'intl/intl.php',
@ -674,6 +675,7 @@ const FUNCTIONS = array (
'ftell' => 'standard/standard_5.php',
'ftok' => 'standard/standard_9.php',
'ftp_alloc' => 'ftp/ftp.php',
'ftp_append' => 'ftp/ftp.php',
'ftp_cdup' => 'ftp/ftp.php',
'ftp_chdir' => 'ftp/ftp.php',
'ftp_chmod' => 'ftp/ftp.php',
@ -688,6 +690,7 @@ const FUNCTIONS = array (
'ftp_login' => 'ftp/ftp.php',
'ftp_mdtm' => 'ftp/ftp.php',
'ftp_mkdir' => 'ftp/ftp.php',
'ftp_mlsd' => 'ftp/ftp.php',
'ftp_nb_continue' => 'ftp/ftp.php',
'ftp_nb_fget' => 'ftp/ftp.php',
'ftp_nb_fput' => 'ftp/ftp.php',
@ -862,6 +865,7 @@ const FUNCTIONS = array (
'hash_final' => 'hash/hash.php',
'hash_hkdf' => 'hash/hash.php',
'hash_hmac' => 'hash/hash.php',
'hash_hmac_algos' => 'hash/hash.php',
'hash_hmac_file' => 'hash/hash.php',
'hash_init' => 'hash/hash.php',
'hash_pbkdf2' => 'hash/hash.php',
@ -957,6 +961,7 @@ const FUNCTIONS = array (
'imagealphablending' => 'gd/gd.php',
'imageantialias' => 'gd/gd.php',
'imagearc' => 'gd/gd.php',
'imagebmp' => 'gd/gd.php',
'imagechar' => 'gd/gd.php',
'imagecharup' => 'gd/gd.php',
'imagecolorallocate' => 'gd/gd.php',
@ -982,6 +987,7 @@ const FUNCTIONS = array (
'imagecopyresampled' => 'gd/gd.php',
'imagecopyresized' => 'gd/gd.php',
'imagecreate' => 'gd/gd.php',
'imagecreatefrombmp' => 'gd/gd.php',
'imagecreatefromgd' => 'gd/gd.php',
'imagecreatefromgd2' => 'gd/gd.php',
'imagecreatefromgd2part' => 'gd/gd.php',
@ -1015,6 +1021,7 @@ const FUNCTIONS = array (
'imagegammacorrect' => 'gd/gd.php',
'imagegd' => 'gd/gd.php',
'imagegd2' => 'gd/gd.php',
'imagegetclip' => 'gd/gd.php',
'imagegetinterpolation' => 'gd/gd.php',
'imagegif' => 'gd/gd.php',
'imagegrabscreen' => 'gd/gd.php',
@ -1025,6 +1032,7 @@ const FUNCTIONS = array (
'imagelayereffect' => 'gd/gd.php',
'imageline' => 'gd/gd.php',
'imageloadfont' => 'gd/gd.php',
'imageopenpolygon' => 'gd/gd.php',
'imagepalettecopy' => 'gd/gd.php',
'imagepalettetotruecolor' => 'gd/gd.php',
'imagepng' => 'gd/gd.php',
@ -1037,10 +1045,12 @@ const FUNCTIONS = array (
'imagepsslantfont' => 'gd/gd.php',
'imagepstext' => 'gd/gd.php',
'imagerectangle' => 'gd/gd.php',
'imageresolution' => 'gd/gd.php',
'imagerotate' => 'gd/gd.php',
'imagesavealpha' => 'gd/gd.php',
'imagescale' => 'gd/gd.php',
'imagesetbrush' => 'gd/gd.php',
'imagesetclip' => 'gd/gd.php',
'imagesetinterpolation' => 'gd/gd.php',
'imagesetpixel' => 'gd/gd.php',
'imagesetstyle' => 'gd/gd.php',
@ -1142,6 +1152,8 @@ const FUNCTIONS = array (
'inet_ntop' => 'standard/standard_3.php',
'inet_pton' => 'standard/standard_3.php',
'inflate_add' => 'zlib/zlib.php',
'inflate_get_read_len' => 'zlib/zlib.php',
'inflate_get_status' => 'zlib/zlib.php',
'inflate_init' => 'zlib/zlib.php',
'ini_alter' => 'standard/standard_4.php',
'ini_get' => 'standard/standard_4.php',
@ -1307,6 +1319,9 @@ const FUNCTIONS = array (
'ldap_errno' => 'ldap/ldap.php',
'ldap_error' => 'ldap/ldap.php',
'ldap_escape' => 'ldap/ldap.php',
'ldap_exop' => 'ldap/ldap.php',
'ldap_exop_passwd' => 'ldap/ldap.php',
'ldap_exop_whoami' => 'ldap/ldap.php',
'ldap_explode_dn' => 'ldap/ldap.php',
'ldap_first_attribute' => 'ldap/ldap.php',
'ldap_first_entry' => 'ldap/ldap.php',
@ -1327,6 +1342,7 @@ const FUNCTIONS = array (
'ldap_next_attribute' => 'ldap/ldap.php',
'ldap_next_entry' => 'ldap/ldap.php',
'ldap_next_reference' => 'ldap/ldap.php',
'ldap_parse_exop' => 'ldap/ldap.php',
'ldap_parse_reference' => 'ldap/ldap.php',
'ldap_parse_result' => 'ldap/ldap.php',
'ldap_read' => 'ldap/ldap.php',
@ -1379,6 +1395,7 @@ const FUNCTIONS = array (
'mail' => 'standard/standard_7.php',
'max' => 'standard/standard_8.php',
'mb_check_encoding' => 'mbstring/mbstring.php',
'mb_chr' => 'mbstring/mbstring.php',
'mb_convert_case' => 'mbstring/mbstring.php',
'mb_convert_encoding' => 'mbstring/mbstring.php',
'mb_convert_kana' => 'mbstring/mbstring.php',
@ -1409,11 +1426,13 @@ const FUNCTIONS = array (
'mb_internal_encoding' => 'mbstring/mbstring.php',
'mb_language' => 'mbstring/mbstring.php',
'mb_list_encodings' => 'mbstring/mbstring.php',
'mb_ord' => 'mbstring/mbstring.php',
'mb_output_handler' => 'mbstring/mbstring.php',
'mb_parse_str' => 'mbstring/mbstring.php',
'mb_preferred_mime_name' => 'mbstring/mbstring.php',
'mb_regex_encoding' => 'mbstring/mbstring.php',
'mb_regex_set_options' => 'mbstring/mbstring.php',
'mb_scrub' => 'mbstring/mbstring.php',
'mb_send_mail' => 'mbstring/mbstring.php',
'mb_split' => 'mbstring/mbstring.php',
'mb_strcut' => 'mbstring/mbstring.php',
@ -1807,16 +1826,20 @@ const FUNCTIONS = array (
'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',
'oci_set_action' => 'oci8/oci8.php',
'oci_set_call_timeout' => 'oci8/oci8v3.php',
'oci_set_client_identifier' => 'oci8/oci8.php',
'oci_set_client_info' => 'oci8/oci8.php',
'oci_set_db_operation' => 'oci8/oci8v3.php',
'oci_set_edition' => 'oci8/oci8.php',
'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',
@ -1947,6 +1970,7 @@ const FUNCTIONS = array (
'openssl_pkcs12_read' => 'openssl/openssl.php',
'openssl_pkcs7_decrypt' => 'openssl/openssl.php',
'openssl_pkcs7_encrypt' => 'openssl/openssl.php',
'openssl_pkcs7_read' => 'openssl/openssl.php',
'openssl_pkcs7_sign' => 'openssl/openssl.php',
'openssl_pkcs7_verify' => 'openssl/openssl.php',
'openssl_pkey_export' => 'openssl/openssl.php',
@ -2280,6 +2304,7 @@ const FUNCTIONS = array (
'sapi_windows_cp_get' => 'standard/basic.php',
'sapi_windows_cp_is_utf8' => 'standard/basic.php',
'sapi_windows_cp_set' => 'standard/basic.php',
'sapi_windows_vt100_support' => 'standard/basic.php',
'scandir' => 'standard/standard_7.php',
'sem_acquire' => 'sysvsem/sysvsem.php',
'sem_get' => 'sysvsem/sysvsem.php',
@ -2374,6 +2399,10 @@ const FUNCTIONS = array (
'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',
@ -2408,6 +2437,98 @@ const FUNCTIONS = array (
'socket_shutdown' => 'sockets/sockets.php',
'socket_strerror' => 'sockets/sockets.php',
'socket_write' => 'sockets/sockets.php',
'sodium_add' => 'sodium/sodium.php',
'sodium_base642bin' => 'sodium/sodium.php',
'sodium_bin2base64' => 'sodium/sodium.php',
'sodium_bin2hex' => 'sodium/sodium.php',
'sodium_compare' => 'sodium/sodium.php',
'sodium_crypto_aead_aes256gcm_decrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_aes256gcm_encrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_aes256gcm_is_available' => 'sodium/sodium.php',
'sodium_crypto_aead_aes256gcm_keygen' => 'sodium/sodium.php',
'sodium_crypto_aead_chacha20poly1305_decrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_chacha20poly1305_encrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_chacha20poly1305_ietf_keygen' => 'sodium/sodium.php',
'sodium_crypto_aead_chacha20poly1305_keygen' => 'sodium/sodium.php',
'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => 'sodium/sodium.php',
'sodium_crypto_aead_xchacha20poly1305_ietf_keygen' => 'sodium/sodium.php',
'sodium_crypto_auth' => 'sodium/sodium.php',
'sodium_crypto_auth_keygen' => 'sodium/sodium.php',
'sodium_crypto_auth_verify' => 'sodium/sodium.php',
'sodium_crypto_box' => 'sodium/sodium.php',
'sodium_crypto_box_keypair' => 'sodium/sodium.php',
'sodium_crypto_box_keypair_from_secretkey_and_publickey' => 'sodium/sodium.php',
'sodium_crypto_box_open' => 'sodium/sodium.php',
'sodium_crypto_box_publickey' => 'sodium/sodium.php',
'sodium_crypto_box_publickey_from_secretkey' => 'sodium/sodium.php',
'sodium_crypto_box_seal' => 'sodium/sodium.php',
'sodium_crypto_box_seal_open' => 'sodium/sodium.php',
'sodium_crypto_box_secretkey' => 'sodium/sodium.php',
'sodium_crypto_box_seed_keypair' => 'sodium/sodium.php',
'sodium_crypto_generichash' => 'sodium/sodium.php',
'sodium_crypto_generichash_final' => 'sodium/sodium.php',
'sodium_crypto_generichash_init' => 'sodium/sodium.php',
'sodium_crypto_generichash_keygen' => 'sodium/sodium.php',
'sodium_crypto_generichash_update' => 'sodium/sodium.php',
'sodium_crypto_kdf_derive_from_key' => 'sodium/sodium.php',
'sodium_crypto_kdf_keygen' => 'sodium/sodium.php',
'sodium_crypto_kx' => 'sodium/sodium.php',
'sodium_crypto_kx_client_session_keys' => 'sodium/sodium.php',
'sodium_crypto_kx_keypair' => 'sodium/sodium.php',
'sodium_crypto_kx_publickey' => 'sodium/sodium.php',
'sodium_crypto_kx_secretkey' => 'sodium/sodium.php',
'sodium_crypto_kx_seed_keypair' => 'sodium/sodium.php',
'sodium_crypto_kx_server_session_keys' => 'sodium/sodium.php',
'sodium_crypto_pwhash' => 'sodium/sodium.php',
'sodium_crypto_pwhash_scryptsalsa208sha256' => 'sodium/sodium.php',
'sodium_crypto_pwhash_scryptsalsa208sha256_str' => 'sodium/sodium.php',
'sodium_crypto_pwhash_scryptsalsa208sha256_str_verify' => 'sodium/sodium.php',
'sodium_crypto_pwhash_str' => 'sodium/sodium.php',
'sodium_crypto_pwhash_str_needs_rehash' => 'sodium/sodium.php',
'sodium_crypto_pwhash_str_verify' => 'sodium/sodium.php',
'sodium_crypto_scalarmult' => 'sodium/sodium.php',
'sodium_crypto_scalarmult_base' => 'sodium/sodium.php',
'sodium_crypto_secretbox' => 'sodium/sodium.php',
'sodium_crypto_secretbox_keygen' => 'sodium/sodium.php',
'sodium_crypto_secretbox_open' => 'sodium/sodium.php',
'sodium_crypto_secretstream_xchacha20poly1305_init_pull' => 'sodium/sodium.php',
'sodium_crypto_secretstream_xchacha20poly1305_init_push' => 'sodium/sodium.php',
'sodium_crypto_secretstream_xchacha20poly1305_keygen' => 'sodium/sodium.php',
'sodium_crypto_secretstream_xchacha20poly1305_pull' => 'sodium/sodium.php',
'sodium_crypto_secretstream_xchacha20poly1305_push' => 'sodium/sodium.php',
'sodium_crypto_secretstream_xchacha20poly1305_rekey' => 'sodium/sodium.php',
'sodium_crypto_shorthash' => 'sodium/sodium.php',
'sodium_crypto_shorthash_keygen' => 'sodium/sodium.php',
'sodium_crypto_sign' => 'sodium/sodium.php',
'sodium_crypto_sign_detached' => 'sodium/sodium.php',
'sodium_crypto_sign_ed25519_pk_to_curve25519' => 'sodium/sodium.php',
'sodium_crypto_sign_ed25519_sk_to_curve25519' => 'sodium/sodium.php',
'sodium_crypto_sign_keypair' => 'sodium/sodium.php',
'sodium_crypto_sign_keypair_from_secretkey_and_publickey' => 'sodium/sodium.php',
'sodium_crypto_sign_open' => 'sodium/sodium.php',
'sodium_crypto_sign_publickey' => 'sodium/sodium.php',
'sodium_crypto_sign_publickey_from_secretkey' => 'sodium/sodium.php',
'sodium_crypto_sign_secretkey' => 'sodium/sodium.php',
'sodium_crypto_sign_seed_keypair' => 'sodium/sodium.php',
'sodium_crypto_sign_verify_detached' => 'sodium/sodium.php',
'sodium_crypto_stream' => 'sodium/sodium.php',
'sodium_crypto_stream_keygen' => 'sodium/sodium.php',
'sodium_crypto_stream_xor' => 'sodium/sodium.php',
'sodium_hex2bin' => 'sodium/sodium.php',
'sodium_increment' => 'sodium/sodium.php',
'sodium_library_version_major' => 'sodium/sodium.php',
'sodium_library_version_minor' => 'sodium/sodium.php',
'sodium_memcmp' => 'sodium/sodium.php',
'sodium_memzero' => 'sodium/sodium.php',
'sodium_pad' => 'sodium/sodium.php',
'sodium_randombytes_buf' => 'sodium/sodium.php',
'sodium_randombytes_random16' => 'sodium/sodium.php',
'sodium_randombytes_uniform' => 'sodium/sodium.php',
'sodium_unpad' => 'sodium/sodium.php',
'sodium_version_string' => 'sodium/sodium.php',
'sort' => 'standard/standard_8.php',
'soundex' => 'standard/standard_2.php',
'spl_autoload' => 'SPL/SPL_f.php',
@ -2418,6 +2539,7 @@ const FUNCTIONS = array (
'spl_autoload_unregister' => 'SPL/SPL_f.php',
'spl_classes' => 'SPL/SPL_f.php',
'spl_object_hash' => 'SPL/SPL_f.php',
'spl_object_id' => 'SPL/SPL_f.php',
'split' => 'regex/ereg.php',
'spliti' => 'regex/ereg.php',
'sprintf' => 'standard/standard_2.php',
@ -2463,6 +2585,7 @@ const FUNCTIONS = array (
'stream_get_transports' => 'standard/standard_6.php',
'stream_get_wrappers' => 'standard/standard_6.php',
'stream_is_local' => 'standard/standard_6.php',
'stream_isatty' => 'standard/standard_9.php',
'stream_register_wrapper' => 'standard/standard_6.php',
'stream_resolve_include_path' => 'standard/standard_6.php',
'stream_select' => 'standard/standard_6.php',
@ -3420,6 +3543,7 @@ const CONSTANTS = array (
'E_WARNING' => 'Core/Core_d.php',
'FILEINFO_CONTINUE' => 'fileinfo/fileinfo.php',
'FILEINFO_DEVICES' => 'fileinfo/fileinfo.php',
'FILEINFO_EXTENSION' => 'fileinfo/fileinfo.php',
'FILEINFO_MIME' => 'fileinfo/fileinfo.php',
'FILEINFO_MIME_ENCODING' => 'fileinfo/fileinfo.php',
'FILEINFO_MIME_TYPE' => 'fileinfo/fileinfo.php',
@ -3686,6 +3810,7 @@ const CONSTANTS = array (
'IMG_BICUBIC_FIXED' => 'gd/gd.php',
'IMG_BILINEAR_FIXED' => 'gd/gd.php',
'IMG_BLACKMAN' => 'gd/gd.php',
'IMG_BMP' => 'gd/gd.php',
'IMG_BOX' => 'gd/gd.php',
'IMG_BSPLINE' => 'gd/gd.php',
'IMG_CATMULLROM' => 'gd/gd.php',
@ -3701,6 +3826,7 @@ const CONSTANTS = array (
'IMG_CROP_TRANSPARENT' => 'gd/gd.php',
'IMG_CROP_WHITE' => 'gd/gd.php',
'IMG_EFFECT_ALPHABLEND' => 'gd/gd.php',
'IMG_EFFECT_MULTIPLY' => 'gd/gd.php',
'IMG_EFFECT_NORMAL' => 'gd/gd.php',
'IMG_EFFECT_OVERLAY' => 'gd/gd.php',
'IMG_EFFECT_REPLACE' => 'gd/gd.php',
@ -3802,6 +3928,8 @@ const CONSTANTS = array (
'JSON_HEX_APOS' => 'json/json.php',
'JSON_HEX_QUOT' => 'json/json.php',
'JSON_HEX_TAG' => 'json/json.php',
'JSON_INVALID_UTF8_IGNORE' => 'json/json.php',
'JSON_INVALID_UTF8_SUBSTITUTE' => 'json/json.php',
'JSON_NUMERIC_CHECK' => 'json/json.php',
'JSON_OBJECT_AS_ARRAY' => 'json/json.php',
'JSON_PARSER_NOTSTRICT' => 'json/json.php',
@ -3825,6 +3953,30 @@ const CONSTANTS = array (
'LC_MONETARY' => 'standard/standard_defines.php',
'LC_NUMERIC' => 'standard/standard_defines.php',
'LC_TIME' => 'standard/standard_defines.php',
'LDAP_CONTROL_ASSERT' => 'ldap/ldap.php',
'LDAP_CONTROL_DONTUSECOPY' => 'ldap/ldap.php',
'LDAP_CONTROL_MANAGEDSAIT' => 'ldap/ldap.php',
'LDAP_CONTROL_PAGEDRESULTS' => 'ldap/ldap.php',
'LDAP_CONTROL_PASSWORDPOLICYREQUEST' => 'ldap/ldap.php',
'LDAP_CONTROL_PASSWORDPOLICYRESPONSE' => 'ldap/ldap.php',
'LDAP_CONTROL_POST_READ' => 'ldap/ldap.php',
'LDAP_CONTROL_PRE_READ' => 'ldap/ldap.php',
'LDAP_CONTROL_PROXY_AUTHZ' => 'ldap/ldap.php',
'LDAP_CONTROL_SORTREQUEST' => 'ldap/ldap.php',
'LDAP_CONTROL_SORTRESPONSE' => 'ldap/ldap.php',
'LDAP_CONTROL_SUBENTRIES' => 'ldap/ldap.php',
'LDAP_CONTROL_SYNC' => 'ldap/ldap.php',
'LDAP_CONTROL_SYNC_DONE' => 'ldap/ldap.php',
'LDAP_CONTROL_SYNC_STATE' => 'ldap/ldap.php',
'LDAP_CONTROL_VALUESRETURNFILTER' => 'ldap/ldap.php',
'LDAP_CONTROL_VLVREQUEST' => 'ldap/ldap.php',
'LDAP_CONTROL_VLVRESPONSE' => 'ldap/ldap.php',
'LDAP_CONTROL_X_DOMAIN_SCOPE' => 'ldap/ldap.php',
'LDAP_CONTROL_X_EXTENDED_DN' => 'ldap/ldap.php',
'LDAP_CONTROL_X_INCREMENTAL_VALUES' => 'ldap/ldap.php',
'LDAP_CONTROL_X_PERMISSIVE_MODIFY' => 'ldap/ldap.php',
'LDAP_CONTROL_X_SEARCH_OPTIONS' => 'ldap/ldap.php',
'LDAP_CONTROL_X_TREE_DELETE' => 'ldap/ldap.php',
'LDAP_DEREF_ALWAYS' => 'ldap/ldap.php',
'LDAP_DEREF_FINDING' => 'ldap/ldap.php',
'LDAP_DEREF_NEVER' => 'ldap/ldap.php',
@ -4316,6 +4468,10 @@ const CONSTANTS = array (
'OP_SECURE' => 'imap/imap.php',
'OP_SHORTCACHE' => 'imap/imap.php',
'OP_SILENT' => 'imap/imap.php',
'PASSWORD_ARGON2I' => 'standard/password.php',
'PASSWORD_ARGON2_DEFAULT_MEMORY_COST' => 'standard/password.php',
'PASSWORD_ARGON2_DEFAULT_THREADS' => 'standard/password.php',
'PASSWORD_ARGON2_DEFAULT_TIME_COST' => 'standard/password.php',
'PASSWORD_BCRYPT' => 'standard/password.php',
'PASSWORD_BCRYPT_DEFAULT_COST' => 'standard/password.php',
'PASSWORD_DEFAULT' => 'standard/password.php',
@ -4429,6 +4585,10 @@ const CONSTANTS = array (
'PHP_EXTENSION_DIR' => 'Core/Core_d.php',
'PHP_EXTRA_VERSION' => 'Core/Core_d.php',
'PHP_FD_SETSIZE' => 'Core/Core_d.php',
'PHP_FLOAT_DIG' => 'Core/Core_d.php',
'PHP_FLOAT_EPSILON' => 'Core/Core_d.php',
'PHP_FLOAT_MAX' => 'Core/Core_d.php',
'PHP_FLOAT_MIN' => 'Core/Core_d.php',
'PHP_INT_MAX' => 'Core/Core_d.php',
'PHP_INT_MIN' => 'Core/Core_d.php',
'PHP_INT_SIZE' => 'Core/Core_d.php',
@ -4440,6 +4600,7 @@ const CONSTANTS = array (
'PHP_MINOR_VERSION' => 'Core/Core_d.php',
'PHP_NORMAL_READ' => 'sockets/sockets.php',
'PHP_OS' => 'Core/Core_d.php',
'PHP_OS_FAMILY' => 'Core/Core_d.php',
'PHP_OUTPUT_HANDLER_CLEAN' => 'Core/Core_d.php',
'PHP_OUTPUT_HANDLER_CLEANABLE' => 'Core/Core_d.php',
'PHP_OUTPUT_HANDLER_CONT' => 'Core/Core_d.php',
@ -4552,6 +4713,7 @@ const CONSTANTS = array (
'PREG_SPLIT_DELIM_CAPTURE' => 'pcre/pcre.php',
'PREG_SPLIT_NO_EMPTY' => 'pcre/pcre.php',
'PREG_SPLIT_OFFSET_CAPTURE' => 'pcre/pcre.php',
'PREG_UNMATCHED_AS_NULL' => 'pcre/pcre.php',
'PRIO_PGRP' => 'pcntl/pcntl.php',
'PRIO_PROCESS' => 'pcntl/pcntl.php',
'PRIO_USER' => 'pcntl/pcntl.php',

View File

@ -561,6 +561,17 @@ class ReflectionClass implements Reflector
#[TentativeType]
public function isIterateable(): bool {}
/**
* Check whether this class is iterable
*
* @link https://php.net/manual/en/reflectionclass.isiterable.php
* @return bool Returns {@see true} on success or {@see false} on failure.
* @since 7.2
*/
#[Pure]
#[TentativeType]
public function isIterable(): bool {}
/**
* Checks whether it implements an interface.
*

View File

@ -1776,7 +1776,7 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
* @param int $flags Flags to control the behaviour of the ArrayObject object.
* @see ArrayObject::setFlags()
*/
public function __construct($array = [], $flags = 0, $iterator_class = null) {}
public function __construct($array = [], $flags = 0) {}
/**
* Check if offset exists

View File

@ -186,3 +186,11 @@ function iterator_apply(Traversable $iterator, callable $callback, ?array $args)
* @since 5.4
*/
function class_uses($object_or_class, bool $autoload = true): array|false {}
/**
* return the integer object handle for given object
* @param object $object
* @return int
* @since 7.2
*/
function spl_object_id(object $object): int {}

View File

@ -10,6 +10,74 @@ use JetBrains\PhpStorm\Pure;
*/
interface DateTimeInterface
{
/**
* @since 7.2
*/
public const ATOM = 'Y-m-d\TH:i:sP';
/**
* @since 7.2
*/
public const COOKIE = 'l, d-M-Y H:i:s T';
/**
* This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons.
* Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead.
* @since 7.2
* @deprecated
*/
public const ISO8601 = 'Y-m-d\TH:i:sO';
/**
* @since 7.2
*/
public const RFC822 = 'D, d M y H:i:s O';
/**
* @since 7.2
*/
public const RFC850 = 'l, d-M-y H:i:s T';
/**
* @since 7.2
*/
public const RFC1036 = 'D, d M y H:i:s O';
/**
* @since 7.2
*/
public const RFC1123 = 'D, d M Y H:i:s O';
/**
* @since 7.2
*/
public const RFC2822 = 'D, d M Y H:i:s O';
/**
* @since 7.2
*/
public const RFC3339 = 'Y-m-d\TH:i:sP';
/**
* @since 7.2
*/
public const RFC3339_EXTENDED = 'Y-m-d\TH:i:s.vP';
/**
* @since 7.2
*/
public const RFC7231 = 'D, d M Y H:i:s \G\M\T';
/**
* @since 7.2
*/
public const RSS = 'D, d M Y H:i:s O';
/**
* @since 7.2
*/
public const W3C = 'Y-m-d\TH:i:sP';
/**
* (PHP 5 >=5.5.0)<br/>
* Returns the difference between two DateTime objects
@ -896,4 +964,13 @@ class DatePeriod implements IteratorAggregate
#[TentativeType]
public function __wakeup(): void {}
/**
* Get the number of recurrences
* @return int|null
* @link https://php.net/manual/en/dateperiod.getrecurrences.php
* @since 7.2.17
*/
#[TentativeType]
public function getRecurrences(): ?int {}
}

View File

@ -1128,6 +1128,13 @@ class DOMNodeList implements IteratorAggregate, Countable
* index.
*/
public function item($index) {}
/**
* @return int<0, max>
* @since 7.2
*/
#[TentativeType]
public function count(): int {}
}
/**
@ -1197,6 +1204,13 @@ class DOMNamedNodeMap implements IteratorAggregate, Countable
* @param $localName [optional]
*/
public function removeNamedItemNS($namespace, $localName) {}
/**
* @return int<0,max>
* @since 7.2
*/
#[TentativeType]
public function count(): int {}
}
/**

View File

@ -59,6 +59,14 @@ define('FILEINFO_PRESERVE_ATIME', 128);
*/
define('FILEINFO_RAW', 256);
/**
* Returns the file extension appropriate for a the MIME type detected in the file.
* For types that commonly have multiple file extensions, such as JPEG images, then the return value is multiple extensions speparated by a forward slash e.g.: "jpeg/jpg/jpe/jfif".
* For unknown types not available in the magic.mime database, then return value is "???". Available since PHP 7.2.0.
* @since 7.2
*/
define('FILEINFO_EXTENSION', 2097152);
/**
* (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
* Create a new fileinfo resource

View File

@ -77,6 +77,26 @@ define('FTP_FINISHED', 1);
*/
define('FTP_MOREDATA', 2);
/**
* append the contents of a file to another file on the ftp server
* @param resource $ftp
* @param string $remote_filename
* @param string $local_filename
* @param int $mode Optional since PHP 7.3
* @return bool
* @since 7.2
*/
function ftp_append($ftp, string $remote_filename, string $local_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode): bool {}
/**
* returns a list of files in the given directory
* @param resource $ftp
* @param string $directory
* @return array|false
* @since 7.2
*/
function ftp_mlsd($ftp, string $directory): array|false {}
/**
* Opens an FTP connection
* @link https://php.net/manual/en/function.ftp-connect.php

View File

@ -51,6 +51,13 @@ define('IMG_XPM', 16);
*/
define('IMG_WEBP', 32);
/**
* Used as a return value by {@see imagetypes()}
* @since 7.2
* @link https://php.net/manual/en/image.constants.php#constant.img-bmp
*/
define('IMG_BMP', 64);
/**
* Special color option which can be used instead of color allocated with
* {@see imagecolorallocate()} or {@see imagecolorallocatealpha()}
@ -155,6 +162,13 @@ define('IMG_EFFECT_NORMAL', 2);
*/
define('IMG_EFFECT_OVERLAY', 3);
/**
* Alpha blending effect used by the {@see imagelayereffect()} function.
* @link https://php.net/manual/en/image.constants.php#constant.img-effect-multiply
* @since 7.2
*/
define('IMG_EFFECT_MULTIPLY', 4);
/**
* When the bundled version of GD is used this is 1 otherwise
* it's set to 0.
@ -2694,6 +2708,91 @@ function imagefilter($image, int $filter, $arg1 = null, $arg2 = null, $arg3 = nu
*/
function imageconvolution($image, array $matrix, float $divisor, float $offset): bool {}
/**
* @param resource $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
* @param int|null $resolution_x The horizontal resolution in DPI.
* @param int|null $resolution_y The vertical resolution in DPI.
* @return array|bool When used as getter (that is without the optional parameters), it returns <b>TRUE</b> on success, or <b>FALSE</b> on failure. When used as setter (that is with one or both optional parameters given), it returns an indexed array of the horizontal and vertical resolution on success, or <b>FALSE</b> on failure.
* @link https://php.net/manual/en/function.imageresolution.php
* @since 7.2
*/
function imageresolution($image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool {}
/**
* <b>imagesetclip()</b> sets the current clipping rectangle, i.e. the area beyond which no pixels will be drawn.
* @param resource $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
* @param int $x1 The x-coordinate of the upper left corner.
* @param int $y1 The y-coordinate of the upper left corner.
* @param int $x2 The x-coordinate of the lower right corner.
* @param int $y2 The y-coordinate of the lower right corner.
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @link https://php.net/manual/en/function.imagesetclip.php
* @see imagegetclip()
* @since 7.2
*/
function imagesetclip($image, int $x1, int $y1, int $x2, int $y2): bool {}
/**
* <b>imagegetclip()</b> retrieves the current clipping rectangle, i.e. the area beyond which no pixels will be drawn.
* @param resource $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}
* @return array|false an indexed array with the coordinates of the clipping rectangle which has the following entries:
* <ul>
* <li>x-coordinate of the upper left corner</li>
* <li>y-coordinate of the upper left corner</li>
* <li>x-coordinate of the lower right corner</li>
* <li>y-coordinate of the lower right corner</li>
* </ul>
* Returns <b>FALSE</b> on error.
* @link https://php.net/manual/en/function.imagegetclip.php
* @see imagesetclip()
* @since 7.2
*/
function imagegetclip($image): array {}
/**
* <b>imageopenpolygon()</b> draws an open polygon on the given <b>image.</b> Contrary to {@see imagepolygon()}, no line is drawn between the last and the first point.
* @param resource $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
* @param int[] $points An array containing the polygon's vertices, e.g.:
* <pre>
* points[0] = x0
* points[1] = y0
* points[2] = x1
* points[3] = y1
* </pre>
* @param int $num_points_or_color Total number of points (vertices).
* @param int|null $color A color identifier created with {@see imagecolorallocate()}.
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @link https://php.net/manual/en/function.imageopenpolygon.php
* @since 7.2
* @see imageplygon()
*/
function imageopenpolygon($image, array $points, #[Deprecated(since: "8.1")] int $num_points_or_color, ?int $color): bool {}
/**
* <b>imagecreatefrombmp()</b> returns an image identifier representing the image obtained from the given filename.
* <b>TIP</b> 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|false Returns an image resource identifier on success, <b>FALSE</b> on errors.
* @link https://php.net/manual/en/function.imagecreatefrombmp.php
* @since 7.2
*/
function imagecreatefrombmp(string $filename) {}
/**
* Outputs or saves a BMP version of the given <b>image</b>.
* @param resource $image An image resource, returned by one of the image creation functions, such as {@see imagecreatetruecolor()}.
* @param mixed $file The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or <b>NULL</b>, the raw image stream will be outputted directly.
* <br />
* <b>Note:</b> <b>NULL</b> is invalid if the <b>compressed</b> arguments is not used.
* @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not.
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
* <br />
* <b>Caution</b> However, if libgd fails to output the image, this function returns <b>TRUE</b>.
* @link https://php.net/manual/en/function.imagebmp.php
* @since 7.2
*/
function imagebmp($image, $file = null, bool $compressed = true): bool {}
/**
* @param string $filename
* @return resource|false

View File

@ -199,7 +199,7 @@ function hash_hmac_file(string $algo, string $filename, string $key, bool $binar
* and <b>hash_final</b>.
*/
#[Pure]
function hash_init(string $algo, int $flags = 0, string $key = '') {}
function hash_init(string $algo, int $flags = 0, string $key = ''): HashContext {}
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
@ -213,7 +213,7 @@ function hash_init(string $algo, int $flags = 0, string $key = '') {}
* </p>
* @return bool <b>TRUE</b>.
*/
function hash_update($context, string $data): bool {}
function hash_update(HashContext $context, string $data): bool {}
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
@ -231,7 +231,7 @@ function hash_update($context, string $data): bool {}
* </p>
* @return int Actual number of bytes added to the hashing context from <i>handle</i>.
*/
function hash_update_stream($context, $stream, int $length = -1): int {}
function hash_update_stream(HashContext $context, $stream, int $length = -1): int {}
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
@ -248,7 +248,7 @@ function hash_update_stream($context, $stream, int $length = -1): int {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function hash_update_file($context, string $filename, $stream_context): bool {}
function hash_update_file(HashContext $context, string $filename, $stream_context): bool {}
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
@ -265,7 +265,7 @@ function hash_update_file($context, string $filename, $stream_context): bool {}
* unless <i>raw_output</i> is set to true in which case the raw
* binary representation of the message digest is returned.
*/
function hash_final($context, bool $binary = false): string {}
function hash_final(HashContext $context, bool $binary = false): string {}
/**
* Copy hashing context
@ -276,7 +276,7 @@ function hash_final($context, bool $binary = false): string {}
* @return HashContext|resource a copy of Hashing Context resource.
*/
#[Pure]
function hash_copy($context) {}
function hash_copy(HashContext $context): HashContext {}
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
@ -311,6 +311,15 @@ function hash_algos(): array {}
#[Pure]
function hash_hkdf(string $algo, string $key, int $length = 0, string $info = '', string $salt = ''): string|false {}
/**
* Return a list of registered hashing algorithms suitable for hash_hmac
* @return string[] Returns a numerically indexed array containing the list of supported hashing algorithms suitable for {@see hash_hmac()}.
* @since 7.2
* Return a list of registered hashing algorithms suitable for hash_hmac
*/
#[Pure]
function hash_hmac_algos(): array {}
/**
* Generate a PBKDF2 key derivation of a supplied password
* @link https://php.net/manual/en/function.hash-pbkdf2.php
@ -430,3 +439,18 @@ function mhash_count(): int {}
#[Pure]
#[Deprecated(since: "8.1")]
function mhash(int $algo, string $data, ?string $key): string|false {}
/**
* @since 7.2
*/
final class HashContext
{
private function __construct() {}
public function __serialize(): array {}
/**
* @param array $data
*/
public function __unserialize($data): void {}
}

View File

@ -7483,7 +7483,7 @@ class UConverter
* @since 5.5
*/
#[TentativeType]
public static function transcode($str, $toEncoding, $fromEncoding, $options = []) {}
public static function transcode($str, $toEncoding, $fromEncoding, ?array $options = []): string|false {}
/**
* (PHP 5 >=5.5.0)<br/>

View File

@ -178,6 +178,18 @@ define('JSON_PRESERVE_ZERO_FRACTION', 1024);
*/
define('JSON_UNESCAPED_LINE_TERMINATORS', 2048);
/**
* Ignore invalid UTF-8 characters.
* @since 7.2
*/
define('JSON_INVALID_UTF8_IGNORE', 1048576);
/**
* Convert invalid UTF-8 characters to \0xfffd (Unicode Character 'REPLACEMENT CHARACTER').
* @since 7.2
*/
define('JSON_INVALID_UTF8_SUBSTITUTE', 2097152);
/**
* A key starting with \u0000 character was in the string passed to json_decode() when decoding a JSON object into a PHP object.
* Available since PHP 7.0.0.

View File

@ -186,6 +186,174 @@ define('LDAP_OPT_TIMEOUT', 20482);
define('LDAP_OPT_DIAGNOSTIC_MESSAGE', 50);
/**
* Control Constant - Manage DSA IT (» RFC 3296)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_MANAGEDSAIT', "2.16.840.1.113730.3.4.2");
/**
* Control Constant - Proxied Authorization (» RFC 4370)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_PROXY_AUTHZ', "2.16.840.1.113730.3.4.18");
/**
* Control Constant - Subentries (» RFC 3672)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_SUBENTRIES', "1.3.6.1.4.1.4203.1.10.1");
/**
* Control Constant - Filter returned values (» RFC 3876)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_VALUESRETURNFILTER', "1.2.826.0.1.3344810.2.3");
/**
* Control Constant - Assertion (» RFC 4528)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_ASSERT', "1.3.6.1.1.12");
/**
* Control Constant - Pre read (» RFC 4527)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_PRE_READ', "1.3.6.1.1.13.1");
/**
* Control Constant - Post read (» RFC 4527)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_POST_READ', "1.3.6.1.1.13.2");
/**
* Control Constant - Sort request (» RFC 2891)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_SORTREQUEST', "1.2.840.113556.1.4.473");
/**
* Control Constant - Sort response (» RFC 2891)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_SORTRESPONSE', "1.2.840.113556.1.4.474");
/**
* Control Constant - Paged results (» RFC 2696)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_PAGEDRESULTS', "1.2.840.113556.1.4.319");
/**
* Control Constant - Content Synchronization Operation (» RFC 4533)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_SYNC', "1.3.6.1.4.1.4203.1.9.1.1");
/**
* Control Constant - Content Synchronization Operation State (» RFC 4533)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_SYNC_STATE', "1.3.6.1.4.1.4203.1.9.1.2");
/**
* Control Constant - Content Synchronization Operation Done (» RFC 4533)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_SYNC_DONE', "1.3.6.1.4.1.4203.1.9.1.3");
/**
* Control Constant - Don't Use Copy (» RFC 6171)
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_DONTUSECOPY', "1.3.6.1.1.22");
/**
* Control Constant - Password Policy Request
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_PASSWORDPOLICYREQUEST', "1.3.6.1.4.1.42.2.27.8.5.1");
/**
* Control Constant - Password Policy Response
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_PASSWORDPOLICYRESPONSE', "1.3.6.1.4.1.42.2.27.8.5.1");
/**
* Control Constant - Active Directory Incremental Values
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_X_INCREMENTAL_VALUES', "1.2.840.113556.1.4.802");
/**
* Control Constant - Active Directory Domain Scope
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_X_DOMAIN_SCOPE', "1.2.840.113556.1.4.1339");
/**
* Control Constant - Active Directory Permissive Modify
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_X_PERMISSIVE_MODIFY', "1.2.840.113556.1.4.1413");
/**
* Control Constant - Active Directory Search Options
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_X_SEARCH_OPTIONS', "1.2.840.113556.1.4.1340");
/**
* Control Constant - Active Directory Tree Delete
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_X_TREE_DELETE', "1.2.840.113556.1.4.805");
/**
* Control Constant - Active Directory Extended DN
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_X_EXTENDED_DN', "1.2.840.113556.1.4.529");
/**
* Control Constant - Virtual List View Request
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_VLVREQUEST', "2.16.840.1.113730.3.4.9");
/**
* Control Constant - Virtual List View Response
* @link https://php.net/manual/en/ldap.constants.php
* @since 7.2
*/
define('LDAP_CONTROL_VLVRESPONSE', "2.16.840.1.113730.3.4.10");
/**
* Extended Operation constant - Modify password
*/
@ -211,6 +379,54 @@ define('LDAP_EXOP_TURN', "1.3.6.1.1.19");
*/
define('LDAP_EXOP_WHO_AM_I', "1.3.6.1.4.1.4203.1.11.3");
/**
* PASSWD extended operation helper
* @link https://www.php.net/manual/en/function.ldap-exop-passwd.php
* @param resource $ldap An LDAP link identifier, returned by ldap_connect().
* @param string $user dn of the user to change the password of.
* @param string $old_password The old password of this user. May be omitted depending of server configuration.
* @param string $new_password The new password for this user. May be omitted or empty to have a generated password.
* @param array &$controls If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request.
* @return string|bool Returns the generated password if newpw is empty or omitted. Otherwise returns TRUE on success and FALSE on failure.
* @since 7.2
*/
function ldap_exop_passwd($ldap, string $user, string $old_password, string $new_password): string|bool {}
/**
* WHOAMI extended operation helper
* @link https://www.php.net/manual/en/function.ldap-exop-whoami.php
* @param resource $ldap An LDAP link identifier, returned by ldap_connect().
* @return string|false The data returned by the server, or FALSE on error.
* @since 7.2
*/
function ldap_exop_whoami($ldap): string|false {}
/**
* Performs an extended operation on the specified link with reqoid the OID of the operation and reqdata the data.
* @link https://www.php.net/manual/en/function.ldap-exop.php
* @param resource $ldap An LDAP link identifier, returned by ldap_connect().
* @param string $request_oid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.
* @param string|null $request_data [optional] The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.
* @param array|null $controls If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request.
* @param string &$response_data [optional] Will be filled with the extended operation response data if provided. If not provided you may use ldap_parse_exop on the result object later to get this data.
* @param string &$response_oid [optional] Will be filled with the response OID if provided, usually equal to the request OID.
* @return resource|bool When used with retdata, returns TRUE on success or FALSE on error. When used without retdata, returns a result identifier or FALSE on error.
* @since 7.2
*/
function ldap_exop($ldap, string $request_oid, ?string $request_data, array $controls = null, &$response_data, &$response_oid) {}
/**
* Parse LDAP extended operation data from result object result
* @link https://www.php.net/manual/en/function.ldap-parse-exop.php
* @param resource $ldap An LDAP link identifier, returned by ldap_connect().
* @param resource $result An LDAP result resource, returned by ldap_exop().
* @param string &$response_data Will be filled by the response data.
* @param string &$response_oid Will be filled by the response OID.
* @return bool Returns TRUE on success or FALSE on failure.
* @since 7.2
*/
function ldap_parse_exop($ldap, $result, &$response_data, &$response_oid): bool {}
/**
* Translate 8859 characters to t61 characters
* @link https://www.php.net/manual/en/function.ldap-8859-to-t61.php

View File

@ -849,7 +849,7 @@ function mb_encode_numericentity(string $string, array $map, ?string $encoding =
* @return string|false|null The converted string.
*/
#[Pure]
function mb_decode_numericentity(string $string, array $map, ?string $encoding = null): string|false|null {}
function mb_decode_numericentity(string $string, array $map, ?string $encoding = null, $is_hex = false): string|false|null {}
/**
* Send encoded mail
@ -1322,6 +1322,39 @@ function mbereg_search_getregs() {}
#[Deprecated(replacement: "mb_ereg_search_getpos()", since: "7.3")]
function mbereg_search_getpos() {}
/**
* Get a specific character.
* @link https://www.php.net/manual/en/function.mb-chr.php
* @param int $codepoint
* @param string|null $encoding [optional]
* @return string|false specific character or FALSE on failure.
* @since 7.2
*/
#[Pure]
function mb_chr(int $codepoint, ?string $encoding): string|false {}
/**
* Get code point of character
* @link https://www.php.net/manual/en/function.mb-ord.php
* @param string $string
* @param string|null $encoding [optional]
* @return int|false code point of character or FALSE on failure.
* @since 7.2
*/
#[Pure]
function mb_ord(string $string, ?string $encoding): int|false {}
/**
* Scrub broken multibyte strings.
* @link https://www.php.net/manual/en/function.mb-scrub.php
* @param string $string
* @param string|null $encoding [optional]
* @return string|false
* @since 7.2
*/
#[Pure]
function mb_scrub(string $string, ?string $encoding): string|false {}
/**
* @param $position
* @see mb_ereg_search_setpos

View File

@ -1037,7 +1037,7 @@ function mysqli_get_charset(mysqli $mysql): ?object {}
* @param mysqli|null $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return string|null A string that represents the MySQL client library version
*/
function mysqli_get_client_info(mysqli $mysql): ?string {}
function mysqli_get_client_info(): ?string {}
/**
* Returns the MySQL client version as an integer

View File

@ -441,6 +441,34 @@ define('SQLT_BOL', 252);
*/
define('OCI_B_BOL', 252);
/**
* Register a user-defined callback function for Oracle Database TAF.
* @link https://www.php.net/manual/en/function.oci-register-taf-callback.php
* @param resource $connection <p>
* An Oracle connection identifier.
* </p>
* @param mixed $callbackFn [optional] <p>
* A user-defined callback to register for Oracle TAF. It can be a string of the function name or a Closure (anonymous function).<br/>
* The interface of a TAF user-defined callback function is as follows:<br/>
* <i>userCallbackFn ( resource $connection , int $event , int $type ) : int</i><br/>
* See the parameter description and an example on <a href="https://www.php.net/manual/en/oci8.taf.php">OCI8 Transparent Application Failover (TAF) Support</a> page.
* </p>
* @return bool TRUE on success or FALSE on failure.
* @since 7.2
*/
function oci_register_taf_callback($connection, $callbackFn) {}
/**
* Unregister a user-defined callback function for Oracle Database TAF.
* @link https://www.php.net/manual/en/function.oci-unregister-taf-callback.php
* @param resource $connection <p>
* An Oracle connection identifier.
* </p>
* @return bool TRUE on success or FALSE on failure.
* @since 7.2
*/
function oci_unregister_taf_callback($connection) {}
/**
* (PHP 5, PECL OCI8 >= 1.1.0)<br/>
* Associates a PHP variable with a column for query fetches

29
oci8/oci8v3.php Normal file
View File

@ -0,0 +1,29 @@
<?php
/**
* (PHP 7.2 >= 7.2.14, PHP 8, PHP 7 >= 7.3.1, PHP 8, PECL OCI8 >= 2.2.0)<br/>
* Sets a millisecond timeout for database calls
* @link https://php.net/manual/en/function.oci-set-call-timout.php
* @param resource $connection <p>An Oracle connection identifier,
* returned by {@see oci_connect}, {@see oci_pconnect},
* or {@see oci_new_connect}.</p>
* @param int $time_out <p>The maximum time in milliseconds that any
* single round-trip between PHP and Oracle Database may take.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 7.2
*/
function oci_set_call_timeout($connection, int $time_out) {}
/**
* (PHP 7 >== 7.2.14, PHP 8, PHP 7 >= 7.3.1, PHP 8, PECL OCI8 >= 2.2.0)
* Sets the database operation
* @link https://www.php.net/manual/en/function.oci-set-db-operation.php
* @param resource $connection <p>An Oracle connection identifier,
* returned by {@see oci_connect}, {@see oci_pconnect},
* or {@see oci_new_connect}.</p>
* @param string $dbop <p>User chosen string.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 7.2
*/
function oci_set_db_operation($connection, string $dbop) {}

View File

@ -951,7 +951,7 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it
* (the message has been tampered with, or the signing certificate is invalid),
* or -1 on error.
*/
function openssl_pkcs7_verify(string $input_filename, int $flags, ?string $signers_certificates_filename, array $ca_info = [], ?string $untrusted_certificates_filename, ?string $content): int|bool {}
function openssl_pkcs7_verify(string $input_filename, int $flags, ?string $signers_certificates_filename, array $ca_info = [], ?string $untrusted_certificates_filename, ?string $content, ?string $output_filename): int|bool {}
/**
* Decrypts an S/MIME encrypted message
@ -1167,3 +1167,11 @@ function openssl_error_string(): string|false {}
function openssl_get_cert_locations(): array {}
function openssl_get_curve_names(): array|false {}
/**
* @param string $data
* @param array &$certificates
* @return bool
* @since 7.2
*/
function openssl_pkcs7_read(string $data, &$certificates): bool {}

View File

@ -100,6 +100,15 @@ define('PREG_BAD_UTF8_ERROR', 4);
*/
define('PREG_BAD_UTF8_OFFSET_ERROR', 5);
/**
* This flag tells {@see preg_match()} and {@see preg_match_all()}
* to include unmatched subpatterns in <b>$matches</b> as NULL values.
* Without this flag, unmatched subpatterns are reported as empty strings,
* as if they were empty matches. Setting this flag allows to distinguish between these two cases.
* @since 7.2
*/
define('PREG_UNMATCHED_AS_NULL', 512);
/**
* PCRE version and release date (e.g. "7.0 18-Dec-2006").
* @link https://php.net/manual/en/pcre.constants.php

View File

@ -1,7 +1,7 @@
<phpunit bootstrap="vendor/autoload.php"
failOnWarning="true">
<testsuites>
<testsuite name="PHP_7.1">
<testsuite name="PHP_7.2">
<file>tests/BaseClassesTest.php</file>
<file>tests/BaseConstantsTest.php</file>
<file>tests/BaseFunctionsTest.php</file>

View File

@ -191,9 +191,9 @@ function session_destroy(): bool {}
/**
* Free all session variables
* @link https://php.net/manual/en/function.session-unset.php
* @return void|bool since 7.2.0 returns true on success or false on failure.
* @return bool since 7.2.0 returns true on success or false on failure.
*/
function session_unset(): void {}
function session_unset(): bool {}
/**
* Sets user-level session storage functions
@ -358,9 +358,9 @@ function session_cache_expire(int $value): int {}
* httponly
* flag when setting the session cookie.
* </p>
* @return void
* @return bool since 7.2.0 returns true on success or false on failure.
*/
function session_set_cookie_params(int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null): void {}
function session_set_cookie_params(int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null): bool {}
/**
* Get the session cookie parameters
@ -384,16 +384,16 @@ function session_get_cookie_params(): array {}
/**
* Write session data and end session
* @link https://php.net/manual/en/function.session-write-close.php
* @return void|bool since 7.2.0 returns true on success or false on failure.
* @return bool since 7.2.0 returns true on success or false on failure.
*/
function session_write_close(): void {}
function session_write_close(): bool {}
/**
* Alias of <b>session_write_close</b>
* @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.
* @return bool since 7.2.0 returns true on success or false on failure.
*/
function session_commit(): void {}
function session_commit(): bool {}
/**
* (PHP 5 >= 5.4.0)<br>
@ -410,16 +410,16 @@ function session_status(): int {}
* (PHP 5 >= 5.6.0)<br>
* Discard session array changes and finish session
* @link https://php.net/manual/en/function.session-abort.php
* @return void|bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @return bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @since 5.6
*/
function session_abort(): void {}
function session_abort(): bool {}
/**
* (PHP 5 >= 5.6.0)<br>
* Re-initialize session array with original values
* @link https://php.net/manual/en/function.session-reset.php
* @return void|bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @return bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @since 5.6
*/
function session_reset(): void {}
function session_reset(): bool {}

View File

@ -604,7 +604,7 @@ class SoapClient
* @since 5.0.1
*/
#[TentativeType]
public function __doRequest($request, $location, $action, $version, $oneWay = false) {}
public function __doRequest($request, $location, $action, $version, int $oneWay = 0): ?string {}
/**
* The __setCookie purpose
@ -619,7 +619,7 @@ class SoapClient
* @since 5.0.4
*/
#[TentativeType]
public function __setCookie($name, $value) {}
public function __setCookie($name, string $value): void {}
/**
* Sets the location of the Web service to use
@ -713,7 +713,7 @@ class SoapVar
* </p>
* @since 5.0.1
*/
public function __construct($data, $encoding, $typeName, $typeNamespace = '', $nodeName = '', $nodeNamespace = '') {}
public function __construct($data, ?int $encoding, string $typeName, $typeNamespace = '', $nodeName = '', $nodeNamespace = '') {}
/**
* SoapVar constructor

View File

@ -1,5 +1,7 @@
<?php
use JetBrains\PhpStorm\ArrayShape;
define('AF_UNIX', 1);
define('AF_INET', 2);
@ -872,6 +874,62 @@ define('AI_V4MAPPED', 8);
define('AI_ALL', 16);
/**
* (PHP 7 >= 7.2.0)<br/>
* 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 <p>
* Hostname to search.
* </p>
* @param string $service [optional] <p>
* The service to connect to. If service is a name, it is translated to the corresponding port number.
* </p>
* @param array $hints <p>
* Hints provide criteria for selecting addresses returned. You may specify the hints as defined by getadrinfo.
* </p>
* @return AddressInfo[]|false of AddrInfo resource handles that can be used with the other socket_addrinfo functions.
* @since 7.2
*/
function socket_addrinfo_lookup(string $host, ?string $service, array $hints = []): array|false {}
/**
* Create a Socket resource, and connect it to the provided AddrInfo resource.<br/>
* 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 $address <p>
* Resource created from {@see socket_addrinfo_lookup()}
* </p>
* @return resource|null|false Socket resource on success or NULL on failure.
* @since 7.2
*/
function socket_addrinfo_connect(AddressInfo $address) {}
/**
* (PHP 7 >= 7.2.0)<br/>
* Create a Socket resource, and bind it to the provided AddrInfo resource.<br/>
* 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 $address <p>
* Resource created from {@see socket_addrinfo_lookup()}
* </p>
* @return resource|null|false Socket resource on success or NULL on failure.
* @since 7.2
*/
function socket_addrinfo_bind(AddressInfo $address) {}
/**
* (PHP 7 >= 7.2.0)<br/>
* Get information about addrinfo
* @link https://www.php.net/manual/en/function.socket-addrinfo-explain.php
* @param resource|AddressInfo $address <p>
* Resource created from {@see socket_addrinfo_lookup()}
* </p>
* @return array containing the fields in the addrinfo structure.
* @since 7.2
*/
#[ArrayShape(["ai_flags" => "int", "ai_family" => "int", "ai_socktype" => "int", "ai_protocol" => "int", "ai_canonname" => "string", "ai_addr" => ["sin_port" => "int", "sin_addr" => "string", "sin6_port" => "int", "sin6_addr" => "string"]])]
function socket_addrinfo_explain(AddressInfo $address): array {}
/**
* 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
@ -1226,7 +1284,7 @@ function socket_write($socket, string $data, ?int $length = null): int|false {}
/**
* Reads a maximum of length bytes from a socket
* @link https://php.net/manual/en/function.socket-read.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1257,7 +1315,7 @@ function socket_read($socket, int $length, int $mode = PHP_BINARY_READ): string|
/**
* Queries the local side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
* @link https://php.net/manual/en/function.socket-getsockname.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1288,7 +1346,7 @@ function socket_getsockname($socket, &$address, &$port = null): bool {}
/**
* Queries the remote side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on its type
* @link https://php.net/manual/en/function.socket-getpeername.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1321,7 +1379,7 @@ function socket_getpeername($socket, &$address, &$port = null): bool {}
/**
* Initiates a connection on a socket
* @link https://php.net/manual/en/function.socket-connect.php
* @param resource $socket
* @param resource $socket
* @param string $address <p>
* The <i>address</i> parameter is either an IPv4 address
* in dotted-quad notation (e.g. 127.0.0.1) if
@ -1363,7 +1421,7 @@ function socket_strerror(int $error_code): string {}
/**
* Binds a name to a socket
* @link https://php.net/manual/en/function.socket-bind.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @param string $address <p>
@ -1393,7 +1451,7 @@ function socket_bind($socket, string $address, int $port = 0): bool {}
/**
* Receives data from a connected socket
* @link https://php.net/manual/en/function.socket-recv.php
* @param resource $socket <p>
* @param resource $socket <p>
* The <i>socket</i> must be a socket resource previously
* created by socket_create().
* </p>
@ -1457,7 +1515,7 @@ function socket_recv($socket, &$data, int $length, int $flags): int|false {}
/**
* Sends data to a connected socket
* @link https://php.net/manual/en/function.socket-send.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1521,7 +1579,7 @@ function socket_sendmsg($socket, array $message, int $flags): int|false {}
/**
* Receives data from a socket whether or not it is connection-oriented
* @link https://php.net/manual/en/function.socket-recvfrom.php
* @param resource $socket <p>
* @param resource $socket <p>
* The <i>socket</i> must be a socket resource previously
* created by socket_create().
* </p>
@ -1606,7 +1664,7 @@ function socket_recvmsg($socket, array &$message, int $flags): int|false {}
/**
* Sends a message to a socket, whether it is connected or not
* @link https://php.net/manual/en/function.socket-sendto.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created using <b>socket_create</b>.
* </p>
* @param string $data <p>
@ -1665,7 +1723,7 @@ function socket_sendto($socket, string $data, int $length, int $flags, string $a
/**
* Gets socket options for the socket
* @link https://php.net/manual/en/function.socket-get-option.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -2031,7 +2089,7 @@ function socket_get_option($socket, int $level, int $option): array|int|false {}
/**
* Sets socket options for the socket
* @link https://php.net/manual/en/function.socket-set-option.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -2058,7 +2116,7 @@ function socket_set_option($socket, int $level, int $option, $value): bool {}
/**
* Shuts down a socket for receiving, sending, or both
* @link https://php.net/manual/en/function.socket-shutdown.php
* @param resource $socket <p>
* @param resource $socket <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @param int $mode [optional] <p>
@ -2092,7 +2150,7 @@ function socket_shutdown($socket, int $mode = 2): bool {}
/**
* Returns the last error on the socket
* @link https://php.net/manual/en/function.socket-last-error.php
* @param resource $socket [optional] <p>
* @param resource $socket [optional] <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @return int This function returns a socket error code.

View File

@ -190,4 +190,982 @@ define('SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES', 32);
define('SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES', 64);
/**
* Can you access AES-256-GCM? This is only available if you have supported
* hardware.
* @link https://www.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-is-available
* @return bool
* @since 7.2
*/
function sodium_crypto_aead_aes256gcm_is_available(): bool {}
/**
* Authenticated Encryption with Associated Data (decrypt)
* AES-256-GCM
* @link https://www.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-decrypt.php
* @param string $ciphertext encrypted message
* @param string $additional_data additional data
* @param string $nonce
* @param string $key
* @return string|false
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}
/**
* Authenticated Encryption with Associated Data (encrypt)
* AES-256-GCM
* @link https://www.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-encrypt.php
* @param string $message plaintext message
* @param string $additional_data
* @param string $nonce
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_aead_aes256gcm_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}
/**
* Authenticated Encryption with Associated Data (decrypt)
* ChaCha20 + Poly1305
* @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-decrypt.php
* @param string $ciphertext encrypted message
* @param string $additional_data additional data
* @param string $nonce
* @param string $key
* @return string|false
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}
/**
* Authenticated Encryption with Associated Data (encrypt)
* ChaCha20 + Poly1305
* @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-encrypt.php
* @param string $message plaintext message
* @param string $additional_data additional data
* @param string $nonce
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}
/**
* Authenticated Encryption with Associated Data (decrypt)
* ChaCha20 + Poly1305 (IETF version)
* @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-ietf-decrypt.php
* @param string $ciphertext encrypted message
* @param string $additional_data additional data
* @param string $nonce
* @param string $key
* @return string|false
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}
/**
* Authenticated Encryption with Associated Data (encrypt)
* ChaCha20 + Poly1305 (IETF version)
* @link https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-ietf-encrypt.php
* @param string $message plaintext message
* @param string $additional_data additional data
* @param string $nonce
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}
/**
* Secret-key message authentication
* HMAC SHA-512/256
* @link https://www.php.net/manual/en/function.sodium-crypto-auth.php
* @param string $message
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_auth(string $message, string $key): string {}
/**
* Get random bytes for key
* @link https://php.net/manual/en/function.sodium-crypto-auth-keygen.php
* @return string
* @since 7.2
*/
function sodium_crypto_auth_keygen(): string {}
/**
* @link https://php.net/manual/en/function.sodium-crypto-kx-keypair.php
* @since 7.2
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_kx_keypair(): string {}
/**
* @link https://php.net/manual/en/function.sodium-crypto-kx-publickey.php
* @since 7.2
* @param string $key_pair
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_kx_publickey(string $key_pair): string {}
/**
* @link https://php.net/manual/en/function.sodium-crypto-kx-secretkey.php
* @param string $key_pair
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_kx_secretkey(string $key_pair): string {}
/**
* @link https://php.net/manual/en/function.sodium-crypto-kx-seed-keypair.php
* @since 7.2
* @param string $seed
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_kx_seed_keypair(string $seed): string {}
/**
* @link https://php.net/manual/en/function.sodium-crypto-kx-server-session-keys.php
* @since 7.2
* @param string $server_key_pair
* @param string $client_key
* @return string[]
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_kx_server_session_keys(string $server_key_pair, string $client_key): array {}
/**
* Get random bytes for key
* @link https://php.net/manual/en/function.sodium-crypto-generichash-keygen.php
* @return string
* @since 7.2
*/
function sodium_crypto_generichash_keygen(): string {}
/**
* @link https://php.net/manual/en/function.sodium-crypto-kx-client-session-keys.php
* @param string $client_key_pair
* @param string $server_key
* @return string[]
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_kx_client_session_keys(string $client_key_pair, string $server_key): array {}
/**
* @link https://www.php.net/manual/en/function.sodium-crypto-kdf-derive-from-key.php
* @param int $subkey_length
* @param int $subkey_id
* @param string $context
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_kdf_derive_from_key(int $subkey_length, int $subkey_id, string $context, string $key): string {}
/**
* Get random bytes for key
* @link https://php.net/manual/en/function.sodium-crypto-kdf-keygen.php
* @since 7.2
* @return string
*/
function sodium_crypto_kdf_keygen(): string {}
/**
* Get random bytes for key
* @link https://php.net/manual/en/function.sodium-crypto-shorthash-keygen.php
* @since 7.2
* @return string
*/
function sodium_crypto_shorthash_keygen(): string {}
/**
* Get random bytes for key
* @link https://php.net/manual/en/function.sodium-crypto-stream-keygen.php
* @since 7.2
* @return string
*/
function sodium_crypto_stream_keygen(): string {}
/**
* Add padding data
* @link https://php.net/manual/en/function.sodium-pad.php
* @param string $string
* @param int $block_size
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_pad(string $string, int $block_size): string {}
/**
* Remove padding data
* @link https://php.net/manual/en/function.sodium-unpad.php
* @param string $string
* @param int $block_size
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_unpad(string $string, int $block_size): string {}
/**
* Secret-key message verification
* HMAC SHA-512/256
* @link https://www.php.net/manual/en/function.sodium-crypto-auth-verify.php
* @param string $mac
* @param string $message
* @param string $key
* @return bool
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_auth_verify(string $mac, string $message, string $key): bool {}
/**
* Public-key authenticated encryption (encrypt)
* X25519 + Xsalsa20 + Poly1305
* @link https://www.php.net/manual/en/function.sodium-crypto-box.php
* @param string $message
* @param string $nonce
* @param string $key_pair
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box(string $message, string $nonce, string $key_pair): string {}
/**
* Generate an X25519 keypair for use with the sodium_crypto_box API
* @link https://www.php.net/manual/en/function.sodium-crypto-box-keypair.php
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_keypair(): string {}
/**
* Derive an X25519 keypair for use with the sodium_crypto_box API from a seed
* @link https://www.php.net/manual/en/function.sodium-crypto-box-seed-keypair.php
* @param string $seed
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_seed_keypair(string $seed): string {}
/**
* Create an X25519 keypair from an X25519 secret key and X25519 public key
* @link https://www.php.net/manual/en/function.sodium-crypto-box-keypair-from-secretkey-and-publickey.php
* @param string $secret_key
* @param string $public_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key): string {}
/**
* Public-key authenticated encryption (decrypt)
* X25519 + Xsalsa20 + Poly1305
* @link https://www.php.net/manual/en/function.sodium-crypto-box-open.php
* @param string $ciphertext
* @param string $nonce
* @param string $key_pair
* @return string|false
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_pair): string|false {}
/**
* Get an X25519 public key from an X25519 keypair
* @link https://www.php.net/manual/en/function.sodium-crypto-box-publickey.php
* @param string $key_pair
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_publickey(string $key_pair): string {}
/**
* Derive an X25519 public key from an X25519 secret key
* @link https://www.php.net/manual/en/function.sodium-crypto-box-publickey-from-secretkey.php
* @param string $secret_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_publickey_from_secretkey(string $secret_key): string {}
/**
* Anonymous public-key encryption (encrypt)
* X25519 + Xsalsa20 + Poly1305 + BLAKE2b
* @link https://www.php.net/manual/en/function.sodium-crypto-box-seal.php
* @param string $message
* @param string $public_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_seal(string $message, string $public_key): string {}
/**
* Anonymous public-key encryption (decrypt)
* X25519 + Xsalsa20 + Poly1305 + BLAKE2b
* @link https://www.php.net/manual/en/function.sodium-crypto-box-seal-open.php
* @param string $ciphertext
* @param string $key_pair
* @return string|false
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): string|false {}
/**
* Extract the X25519 secret key from an X25519 keypair
* @link https://www.php.net/manual/en/function.sodium-crypto-box-secretkey.php
* @param string $key_pair
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_box_secretkey(string $key_pair): string {}
/**
* Elliptic Curve Diffie Hellman Key Exchange
* X25519
* @param string $secret_key
* @param string $public_key
* @param string $client_publickey
* @param string $server_publickey
* @return string
* @since 7.2
*/
function sodium_crypto_kx(string $secret_key, string $public_key, string $client_publickey, string $server_publickey): string {}
/**
* Fast and secure cryptographic hash
* @link https://www.php.net/manual/en/function.sodium-crypto-generichash.php
* @param string $message
* @param string $key
* @param int $length
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_generichash(string $message, string $key = '', int $length = 32): string {}
/**
* Create a new hash state (e.g. to use for streams)
* BLAKE2b
* @link https://www.php.net/manual/en/function.sodium-crypto-generichash-init.php
* @param string $key
* @param int $length
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_generichash_init(string $key = '', int $length = 32): string {}
/**
* Update the hash state with some data
* BLAKE2b
* @link https://www.php.net/manual/en/function.sodium-crypto-generichash-update.php
* @param string &$state
* @param string $message
* @return bool
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_generichash_update(string &$state, string $message): bool {}
/**
* Get the final hash
* BLAKE2b
* @link https://www.php.net/manual/en/function.sodium-crypto-generichash-final.php
* @param string &$state
* @param int $length
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_generichash_final(string &$state, int $length = 32): string {}
/**
* Secure password-based key derivation function
* Argon2i
* @link https://www.php.net/manual/en/function.sodium-crypto-pwhash.php
* @param int $length
* @param string $password
* @param string $salt
* @param int $opslimit
* @param int $memlimit
* @param int $algo [optional]
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $algo = SODIUM_CRYPTO_PWHASH_ALG_DEFAULT): string {}
/**
* Get a formatted password hash (for storage)
* Argon2i
* @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-str.php
* @param string $password
* @param int $opslimit
* @param int $memlimit
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit): string {}
/**
* Verify a password against a hash
* Argon2i
* @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-str-verify.php
* @param string $hash
* @param string $password
* @return bool
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_pwhash_str_verify(string $hash, string $password): bool {}
/**
* Secure password-based key derivation function
* Scrypt
* @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-scryptsalsa208sha256.php
* @param int $length
* @param string $password
* @param string $salt
* @param int $opslimit
* @param int $memlimit
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_pwhash_scryptsalsa208sha256(int $length, string $password, string $salt, int $opslimit, int $memlimit, $alg = null): string {}
/**
* Get a formatted password hash (for storage)
* Scrypt
* @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-scryptsalsa208sha256-str.php
* @param string $password
* @param int $opslimit
* @param int $memlimit
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_pwhash_scryptsalsa208sha256_str(string $password, int $opslimit, int $memlimit): string {}
/**
* Verify a password against a hash
* Scrypt
* @link https://www.php.net/manual/en/function.sodium-crypto-pwhash-scryptsalsa208sha256-str-verify
* @param string $hash
* @param string $password
* @return bool
* @since 7.2
*/
function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify(string $hash, string $password): bool {}
/**
* Elliptic Curve Diffie Hellman over Curve25519
* X25519
* @link https://www.php.net/manual/en/function.sodium-crypto-scalarmult.php
* @param string $n
* @param string $p
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_scalarmult(string $n, string $p): string {}
/**
* Authenticated secret-key encryption (encrypt)
* Xsals20 + Poly1305
* @link https://www.php.net/manual/en/function.sodium-crypto-secretbox.php
* @param string $message
* @param string $nonce
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_secretbox(string $message, string $nonce, string $key): string {}
/**
* Authenticated secret-key encryption (decrypt)
* Xsals20 + Poly1305
* @link https://www.php.net/manual/en/function.sodium-crypto-secretbox-open.php
* @param string $ciphertext
* @param string $nonce
* @param string $key
* @return string|false
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key): string|false {}
/**
* A short keyed hash suitable for data structures
* SipHash-2-4
* @link https://www.php.net/manual/en/function.sodium-crypto-shorthash.php
* @param string $message
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_shorthash(string $message, string $key): string {}
/**
* Digital Signature
* Ed25519
* @link https://www.php.net/manual/en/function.sodium-crypto-sign.php
* @param string $message
* @param string $secret_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign(string $message, string $secret_key): string {}
/**
* Digital Signature (detached)
* Ed25519
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-detached.php
* @param string $message
* @param string $secret_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_detached(string $message, string $secret_key): string {}
/**
* Convert an Ed25519 public key to an X25519 public key
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-ed25519-pk-to-curve25519.php
* @param string $public_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_ed25519_pk_to_curve25519(string $public_key): string {}
/**
* Convert an Ed25519 secret key to an X25519 secret key
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-ed25519-sk-to-curve25519.php
* @param string $secret_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_ed25519_sk_to_curve25519(string $secret_key): string {}
/**
* Generate an Ed25519 keypair for use with the crypto_sign API
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-keypair.php
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_keypair(): string {}
/**
* Create an Ed25519 keypair from an Ed25519 secret key + Ed25519 public key
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-keypair-from-secretkey-and-publickey.php
* @param string $secret_key
* @param string $public_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_keypair_from_secretkey_and_publickey(string $secret_key, string $public_key): string {}
/**
* Verify a signed message and return the plaintext
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-open.php
* @param string $signed_message
* @param string $public_key
* @return string|false
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_open(string $signed_message, string $public_key): string|false {}
/**
* Get the public key from an Ed25519 keypair
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-publickey.php
* @param string $key_pair
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_publickey(string $key_pair): string {}
/**
* Get the secret key from an Ed25519 keypair
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-secretkey.php
* @param string $key_pair
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_secretkey(string $key_pair): string {}
/**
* Derive an Ed25519 public key from an Ed25519 secret key
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-publickey-from-secretkey.php
* @param string $secret_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_publickey_from_secretkey(string $secret_key): string {}
/**
* Derive an Ed25519 keypair for use with the crypto_sign API from a seed
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-seed-keypair.php
* @param string $seed
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_seed_keypair(string $seed): string {}
/**
* Verify a detached signature
* @link https://www.php.net/manual/en/function.sodium-crypto-sign-verify-detached.php
* @param string $signature
* @param string $message
* @param string $public_key
* @return bool
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key): bool {}
/**
* Create a keystream from a key and nonce
* Xsalsa20
* @link https://www.php.net/manual/en/function.sodium-crypto-stream.php
* @param int $length
* @param string $nonce
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_stream(int $length, string $nonce, string $key): string {}
/**
* Encrypt a message using a stream cipher
* Xsalsa20
* @link https://www.php.net/manual/en/function.sodium-crypto-stream-xor.php
* @param string $message
* @param string $nonce
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_stream_xor(string $message, string $nonce, string $key): string {}
/**
* Generate a string of random bytes
* /dev/urandom
*
* @param int $length
* @return string|false
* @since 7.2
*/
function sodium_randombytes_buf(int $length): string {}
/**
* Generate a 16-bit integer
* /dev/urandom
*
* @return int
* @since 7.2
*/
function sodium_randombytes_random16(): int {}
/**
* Generate an unbiased random integer between 0 and a specified value
* /dev/urandom
*
* @param int $upperBoundNonInclusive
* @return int
* @since 7.2
*/
function sodium_randombytes_uniform(int $upperBoundNonInclusive): int {}
/**
* Convert to hex without side-chanels
* @link https://www.php.net/manual/en/function.sodium-bin2hex.php
* @param string $string
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_bin2hex(string $string): string {}
/**
* Compare two strings in constant time
* @link https://www.php.net/manual/en/function.sodium-compare.php
* @param string $string1
* @param string $string2
* @return int
* @throws SodiumException
* @since 7.2
*/
function sodium_compare(string $string1, string $string2): int {}
/**
* Convert from hex without side-chanels
* @link https://www.php.net/manual/en/function.sodium-hex2bin.php
* @param string $string
* @param string $ignore
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_hex2bin(string $string, string $ignore = ''): string {}
/**
* Increment a string in little-endian
* @link https://www.php.net/manual/en/function.sodium-increment.php
* @param string &$string
* @return void
* @throws SodiumException
* @since 7.2
*/
function sodium_increment(string &$string): void {}
/**
* Add the right operand to the left
* @link https://www.php.net/manual/en/function.sodium-add.php
* @param string &$string1
* @param string $string2
* @throws SodiumException
* @since 7.2
*/
function sodium_add(string &$string1, string $string2): void {}
/**
* Get the true major version of libsodium
* @return int
* @since 7.2
*/
function sodium_library_version_major(): int {}
/**
* Get the true minor version of libsodium
* @return int
* @since 7.2
*/
function sodium_library_version_minor(): int {}
/**
* Compare two strings in constant time
* @link https://www.php.net/manual/en/function.sodium-memcmp.php
* @param string $string1
* @param string $string2
* @return int
* @throws SodiumException
* @since 7.2
*/
function sodium_memcmp(string $string1, string $string2): int {}
/**
* Wipe a buffer
* @link https://www.php.net/manual/en/function.sodium-memzero.php
* @param string &$string
* @throws SodiumException
* @since 7.2
*/
function sodium_memzero(string &$string): void {}
/**
* Get the version string
*
* @return string
* @since 7.2
*/
function sodium_version_string(): string {}
/**
* Scalar multiplication of the base point and your key
* @link https://www.php.net/manual/en/function.sodium-crypto-scalarmult-base
* @param string $secret_key
* @return string
* @throws SodiumException
* @since 7.2
*/
function sodium_crypto_scalarmult_base(string $secret_key, $string_2): string {}
/**
* Creates a random key
*
* It is equivalent to calling random_bytes() but improves code clarity and can
* prevent misuse by ensuring that the provided key length is always be correct.
*
* @since 7.2
* @see https://secure.php.net/manual/en/function.sodium-crypto-secretbox-keygen.php
*/
function sodium_crypto_secretbox_keygen(): string {}
/**
* Creates a random key
*
* It is equivalent to calling random_bytes() but improves code clarity and can
* prevent misuse by ensuring that the provided key length is always be correct.
*
* @since 7.2
* @see https://secure.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-keygen.php
*/
function sodium_crypto_aead_aes256gcm_keygen(): string {}
/**
* Creates a random key
* It is equivalent to calling random_bytes() but improves code clarity and can
* prevent misuse by ensuring that the provided key length is always be correct.
*
* @since 7.2
* @see https://secure.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-keygen.php
*/
function sodium_crypto_aead_chacha20poly1305_keygen(): string {}
/**
* Creates a random key
*
* It is equivalent to calling random_bytes() but improves code clarity and can
* prevent misuse by ensuring that the provided key length is always be correct.
*
* @since 7.2
* @see https://secure.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-ietf-keygen.php
*/
function sodium_crypto_aead_chacha20poly1305_ietf_keygen(): string {}
/**
* @param string $ciphertext
* @param string $additional_data
* @param string $nonce
* @param string $key
* @return string|false
* @throws SodiumException
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-crypto-aead-xchacha20poly1305-ietf-decrypt.php
*/
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string|false {}
/**
* @param string $message
* @param string $additional_data
* @param string $nonce
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
* https://www.php.net/manual/en/function.sodium-crypto-aead-xchacha20poly1305-ietf-encrypt.php
*/
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string {}
/**
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-crypto-aead-xchacha20poly1305-ietf-keygen.php
*/
function sodium_crypto_aead_xchacha20poly1305_ietf_keygen(): string {}
/**
* @param string $password
* @param int $opslimit
* @param int $memlimit
* @return bool
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-crypto-pwhash-str-needs-rehash.php
*/
function sodium_crypto_pwhash_str_needs_rehash(string $password, int $opslimit, int $memlimit): bool {}
/**
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-keygen.php
*/
function sodium_crypto_secretstream_xchacha20poly1305_keygen(): string {}
/**
* @param string $key
* @return array
* @throws SodiumException
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-init-push.php
*/
function sodium_crypto_secretstream_xchacha20poly1305_init_push(string $key): array {}
function sodium_crypto_secretstream_xchacha20poly1305_push(string &$state, string $message, string $additional_data = '', int $tag = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE): string {}
/**
* @param string $header
* @param string $key
* @return string
* @throws SodiumException
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-init-pull.php
*/
function sodium_crypto_secretstream_xchacha20poly1305_init_pull(string $header, string $key): string {}
function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $additional_data = ''): array|false {}
/**
* @param string &$state
* @throws SodiumException
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-rekey.php
*/
function sodium_crypto_secretstream_xchacha20poly1305_rekey(string &$state): void {}
/**
* @param string $string
* @param int $id
* @return string
* @throws SodiumException
* @since 7.2
* @see https://www.php.net/manual/en/function.sodium-bin2base64.php
*/
function sodium_bin2base64(string $string, int $id): string {}
/**
* @param string $string
* @param int $id
* @param string $ignore
* @return string
* @throws SodiumException
* @see https://www.php.net/manual/en/function.sodium-base642bin.php
* @since 7.2
*/
function sodium_base642bin(string $string, int $id, string $ignore = ''): string {}
class SodiumException extends Exception {}

View File

@ -401,7 +401,7 @@ class SQLite3
* <p>Either <b>SQLITE3_OPEN_READONLY</b> or <b>SQLITE3_OPEN_READWRITE</b> to open the stream for reading only, or for reading and writing, respectively.</p>
* @return resource|false Returns a stream resource, or FALSE on failure.
*/
public function openBlob($table, $column, $rowid, $database = 'main') {}
public function openBlob($table, $column, $rowid, $database = 'main', int $flags = SQLITE3_OPEN_READONLY) {}
/**
* Enable throwing exceptions

View File

@ -214,3 +214,36 @@ function sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage,
* @since 7.1
*/
function sapi_windows_cp_is_utf8(): bool {}
/**
* Get or set VT100 support for the specified stream associated to an output buffer of a Windows console.
*
* At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams.
* By the way, if those streams are redirected to a file, the VT100 features may not be enabled.
*
* If VT100 support is enabled, it is possible to use control sequences as they are known from the VT100 terminal.
* They allow the modification of the terminal's output. On Windows these sequences are called Console Virtual Terminal Sequences.
*
* <b>Warning</b> This function uses the <b>ENABLE_VIRTUAL_TERMINAL_PROCESSING</b> flag implemented in the Windows 10 API, so the VT100 feature may not be available on older Windows versions.
*
* @link https://php.net/manual/en/function.sapi-windows-vt100-support.php
* @param resource $stream The stream on which the function will operate.
* @param bool|null $enable <p>
* If bool, the VT100 feature will be enabled (if true) or disabled (if false).
* </p>
* <p>
* If <i>enable</i> is <b>null</b>, the function returns <b>true</b> if the stream <i>stream</i> has VT100 control codes enabled, <b>false</b> otherwise.
* </p>
* <p>
* If <i>enable</i> is a bool, the function will try to enable or disable the VT100 features of the stream <i>stream</i>.
* If the feature has been successfully enabled (or disabled), the function will return <b>true</b>, or <b>false</b> otherwise.
* </p>
* @return bool <p>
* If <i>enable</i> is <b>null</b>: returns <b>true</b> if the VT100 feature is enabled, <b>false</b> otherwise.
* </p>
* <p>
* If <i>enable</i> is a bool: Returns <b>true</b> on success or <b>false</b> on failure.
* </p>
* @since 7.2
*/
function sapi_windows_vt100_support($stream, ?bool $enable = null): bool {}

View File

@ -43,6 +43,43 @@ define('PASSWORD_BCRYPT_DEFAULT_COST', 10);
*/
define('PASSWORD_BCRYPT', "2y");
/**
* PASSWORD_ARGON2I is used to create new password hashes using the Argon2i algorithm.
*
* Supported Options:
* <ul>
* <li>memory_cost (integer) - Maximum memory (in bytes) that may be used to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_MEMORY_COST.</li>
*
* <li>time_cost (integer) - Maximum amount of time it may take to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_TIME_COST.</li>
*
* <li>threads (integer) - Number of threads to use for computing the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS.</li>
* </ul>
* Available as of PHP 7.2.0.
* @since 7.2
*/
define('PASSWORD_ARGON2I', "argon2i");
/**
* Default amount of memory in bytes that Argon2lib will use while trying to compute a hash.
* Available as of PHP 7.2.0.
* @since 7.2
*/
define('PASSWORD_ARGON2_DEFAULT_MEMORY_COST', 65536);
/**
* Default amount of time that Argon2lib will spend trying to compute a hash.
* Available as of PHP 7.2.0.
* @since 7.2
*/
define('PASSWORD_ARGON2_DEFAULT_TIME_COST', 4);
/**
* Default number of threads that Argon2lib will use.
* Available as of PHP 7.2.0.
* @since 7.2
*/
define('PASSWORD_ARGON2_DEFAULT_THREADS', 1);
/**
* Returns information about the given hash
* @link https://secure.php.net/manual/en/function.password-get-info.php

View File

@ -888,6 +888,16 @@ function str_rot13(string $string): string {}
#[Pure(true)]
function stream_get_filters(): array {}
/**
* Check if a stream is a TTY
* @link https://php.net/manual/en/function.stream-isatty.php
* @param resource $stream
* @return bool
* @since 7.2
*/
#[Pure]
function stream_isatty($stream): bool {}
/**
* Register a user defined stream filter
* @link https://php.net/manual/en/function.stream-filter-register.php

View File

@ -97,7 +97,8 @@ class StubMethodsProvider
private static function getFilterFunctionForLanguageLevel(float $languageVersion): callable
{
return fn (PHPClass|PHPInterface $class, PHPMethod $method, ?float $firstSinceVersion) => !$method->isFinal &&
!$class->isFinal && $firstSinceVersion !== null && $firstSinceVersion < $languageVersion && !$method->isReturnTypeTentative;
!$class->isFinal && $firstSinceVersion !== null && $firstSinceVersion < $languageVersion &&
!$method->isReturnTypeTentative && (float)getenv('PHP_VERSION') < $languageVersion;
}
/**

View File

@ -95,6 +95,6 @@ class StubsParametersProvider
private static function getFilterFunctionForLanguageLevel(float $languageVersion): callable
{
return fn (PHPClass|PHPInterface $class, PHPMethod $method, ?float $firstSinceVersion) => !$method->isFinal &&
!$class->isFinal && $firstSinceVersion !== null && $firstSinceVersion < $languageVersion;
!$class->isFinal && $firstSinceVersion !== null && $firstSinceVersion < $languageVersion && (float)getenv('PHP_VERSION') < $languageVersion;
}
}

View File

@ -435,6 +435,34 @@ class ZipArchive implements Countable
*/
public const ER_DELETED = 23;
/**
* No encryption
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.2
*/
public const EM_NONE = 0;
/**
* AES 128 encryption
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.2
*/
public const EM_AES_128 = 257;
/**
* AES 192 encryption
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.2
*/
public const EM_AES_192 = 258;
/**
* AES 256 encryption
* @link https://secure.php.net/manual/en/zip.constants.php
* @since 7.2
*/
public const EM_AES_256 = 259;
/**
* Guess string encoding (is default)
* @link https://secure.php.net/manual/en/zip.constants.php
@ -726,6 +754,15 @@ class ZipArchive implements Countable
*/
public function close() {}
/**
* (PHP 7 >= 7.2.0, PECL zip >= 1.15.0)<br/>
* Counts the number of files in the archive.
* @link https://www.php.net/manual/en/ziparchive.count.php
* @return int
* @since 7.2
*/
public function count() {}
/**
* Returns the status error message, system and/or zip messages
* @link https://php.net/manual/en/ziparchive.getstatusstring.php
@ -927,6 +964,28 @@ class ZipArchive implements Countable
*/
public function setCompressionName(string $name, int $method, int $compflags = 0) {}
/**
* Set the encryption method of an entry defined by its index
* @link https://php.net/manual/en/ziparchive.setencryptionindex.php
* @param int $index Index of the entry.
* @param int $method The encryption method defined by one of the ZipArchive::EM_ constants.
* @param string|null $password [optional] Optional password, default used when missing.
* @return bool Returns TRUE on success or FALSE on failure.
* @since 7.2
*/
public function setEncryptionIndex(int $index, int $method, ?string $password = null) {}
/**
* Set the encryption method of an entry defined by its name
* @link https://php.net/manual/en/ziparchive.setencryptionname.php
* @param string $name Name of the entry.
* @param int $method The encryption method defined by one of the ZipArchive::EM_ constants.
* @param string|null $password [optional] Optional password, default used when missing.
* @return bool Returns TRUE on success or FALSE on failure.
* @since 7.2
*/
public function setEncryptionName(string $name, int $method, ?string $password = null) {}
/**
* (PHP 5 >= 5.6.0, PECL zip >= 1.12.0)<br/>
* @param string $password

View File

@ -557,3 +557,21 @@ function inflate_init(int $encoding, array $options = []) {}
* @since 7.0
*/
function inflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
/**
* Get number of bytes read so far
* @param InflateContext|resource $context
* @return int
* @since 7.2
*/
#[Pure]
function inflate_get_read_len($context): int {}
/**
* Get decompression status
* @param InflateContext|resource $context
* @return int
* @since 7.2
*/
#[Pure]
function inflate_get_status($context): int {}