diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9365c0abb..a2948981e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
- name: Run tests against php 8.1
+ name: Run tests against php 8.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: '8.1'
+ PHP_VERSION: '8.2'
- name: Composer Install
- run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 test_runner composer update
+ run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.2 test_runner composer update
env:
- PHP_VERSION: '8.1'
+ PHP_VERSION: '8.2'
- name: Dump Reflection To File
- run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.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=8.2 php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
env:
- PHP_VERSION: '8.1'
+ PHP_VERSION: '8.2'
- name: Run Tests
- run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 test_runner vendor/bin/phpunit --testsuite PHP_8.1
+ run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.2 test_runner vendor/bin/phpunit --testsuite PHP_8.2
env:
- PHP_VERSION: '8.1'
+ PHP_VERSION: '8.2'
additional:
runs-on: ubuntu-latest
name: Run cs-fixer and stubs structure tests
diff --git a/Core/Core.php b/Core/Core.php
index c4e6cb05e..4dd222921 100644
--- a/Core/Core.php
+++ b/Core/Core.php
@@ -669,9 +669,9 @@ function set_error_handler(?callable $callback, int $error_levels = E_ALL|E_STRI
/**
* Restores the previous error handler function
* @link https://php.net/manual/en/function.restore-error-handler.php
- * @return bool This function always returns true.
+ * @return true This function always returns true.
*/
-function restore_error_handler(): bool {}
+function restore_error_handler(): true {}
/**
* Sets a user-defined exception handler function
@@ -692,9 +692,9 @@ function set_exception_handler(?callable $callback) {}
/**
* Restores the previously defined exception handler function
* @link https://php.net/manual/en/function.restore-exception-handler.php
- * @return bool This function always returns true.
+ * @return true This function always returns true.
*/
-function restore_exception_handler(): bool {}
+function restore_exception_handler(): true {}
/**
* Returns an array with the name of the defined classes
diff --git a/Core/Core_c.php b/Core/Core_c.php
index b72b6673d..cb2f2f500 100644
--- a/Core/Core_c.php
+++ b/Core/Core_c.php
@@ -1028,3 +1028,33 @@ final class ReturnTypeWillChange
{
public function __construct() {}
}
+
+/**
+ * @since 8.2
+ */
+final class AllowDynamicProperties
+{
+ public function __construct() {}
+}
+
+/**
+ * @since 8.2
+ */
+final class SensitiveParameter
+{
+ public function __construct() {}
+}
+
+/**
+ * @since 8.2
+ */
+final class SensitiveParameterValue
+{
+ private readonly mixed $value;
+
+ public function __construct(mixed $value) {}
+
+ public function getValue(): mixed {}
+
+ public function __debugInfo(): array {}
+}
diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php
index 75a6a3b5c..42b9478e2 100644
--- a/PhpStormStubsMap.php
+++ b/PhpStormStubsMap.php
@@ -13,6 +13,7 @@ final class PhpStormStubsMap
'AddressInfo' => 'sockets/sockets.php',
'Aerospike' => 'aerospike/aerospike.php',
'Aerospike\\Bytes' => 'aerospike/Bytes.php',
+ 'AllowDynamicProperties' => 'Core/Core_c.php',
'AppendIterator' => 'SPL/SPL.php',
'ArgumentCountError' => 'Core/Core_c.php',
'ArithmeticError' => 'Core/Core_c.php',
@@ -158,6 +159,16 @@ final class PhpStormStubsMap
'PharException' => 'Phar/Phar.php',
'PharFileInfo' => 'Phar/Phar.php',
'PhpToken' => 'tokenizer/PhpToken.php',
+ 'Random\\BrokenRandomEngineError' => 'random/random.php',
+ 'Random\\CryptoSafeEngine' => 'random/random.php',
+ 'Random\\Engine' => 'random/random.php',
+ 'Random\\Engine\\Mt19937' => 'random/random.php',
+ 'Random\\Engine\\PcgOneseq128XslRr64' => 'random/random.php',
+ 'Random\\Engine\\Secure' => 'random/random.php',
+ 'Random\\Engine\\Xoshiro256StarStar' => 'random/random.php',
+ 'Random\\RandomError' => 'random/random.php',
+ 'Random\\RandomException' => 'random/random.php',
+ 'Random\\Randomizer' => 'random/random.php',
'RangeException' => 'SPL/SPL.php',
'RecursiveArrayIterator' => 'SPL/SPL.php',
'RecursiveCachingIterator' => 'SPL/SPL.php',
@@ -203,6 +214,8 @@ final class PhpStormStubsMap
'SQLite3Result' => 'sqlite3/sqlite3.php',
'SQLite3Stmt' => 'sqlite3/sqlite3.php',
'SeekableIterator' => 'SPL/SPL.php',
+ 'SensitiveParameter' => 'Core/Core_c.php',
+ 'SensitiveParameterValue' => 'Core/Core_c.php',
'Serializable' => 'Core/Core_c.php',
'SessionHandler' => 'session/SessionHandler.php',
'SessionHandlerInterface' => 'session/SessionHandler.php',
@@ -490,6 +503,7 @@ final class PhpStormStubsMap
'curl_share_strerror' => 'curl/curl.php',
'curl_strerror' => 'curl/curl.php',
'curl_unescape' => 'curl/curl.php',
+ 'curl_upkeep' => 'curl/curl.php',
'curl_version' => 'curl/curl.php',
'current' => 'standard/standard_8.php',
'date' => 'date/date.php',
@@ -1225,6 +1239,7 @@ final class PhpStormStubsMap
'ini_alter' => 'standard/standard_4.php',
'ini_get' => 'standard/standard_4.php',
'ini_get_all' => 'standard/standard_4.php',
+ 'ini_parse_quantity' => 'standard/standard_4.php',
'ini_restore' => 'standard/standard_4.php',
'ini_set' => 'standard/standard_4.php',
'intcal_get_maximum' => 'intl/intl.php',
@@ -1432,6 +1447,7 @@ final class PhpStormStubsMap
'libxml_clear_errors' => 'libxml/libxml.php',
'libxml_disable_entity_loader' => 'libxml/libxml.php',
'libxml_get_errors' => 'libxml/libxml.php',
+ 'libxml_get_external_entity_loader' => 'libxml/libxml.php',
'libxml_get_last_error' => 'libxml/libxml.php',
'libxml_set_external_entity_loader' => 'libxml/libxml.php',
'libxml_set_streams_context' => 'libxml/libxml.php',
@@ -1581,6 +1597,7 @@ final class PhpStormStubsMap
'mdecrypt_generic' => 'mcrypt/mcrypt.php',
'memory_get_peak_usage' => 'standard/standard_4.php',
'memory_get_usage' => 'standard/standard_4.php',
+ 'memory_reset_peak_usage' => 'standard/standard_4.php',
'metaphone' => 'standard/standard_8.php',
'method_exists' => 'Core/Core.php',
'mhash' => 'hash/hash.php',
@@ -1727,6 +1744,7 @@ final class PhpStormStubsMap
'mysqli_error_list' => 'mysqli/mysqli.php',
'mysqli_escape_string' => 'mysqli/mysqli.php',
'mysqli_execute' => 'mysqli/mysqli.php',
+ 'mysqli_execute_query' => 'mysqli/mysqli.php',
'mysqli_fetch' => 'mysqli/mysqli.php',
'mysqli_fetch_all' => 'mysqli/mysqli.php',
'mysqli_fetch_array' => 'mysqli/mysqli.php',
@@ -2022,6 +2040,7 @@ final class PhpStormStubsMap
'opendir' => 'standard/standard_7.php',
'openlog' => 'standard/standard_7.php',
'openssl_cipher_iv_length' => 'openssl/openssl.php',
+ 'openssl_cipher_key_length' => 'openssl/openssl.php',
'openssl_cms_decrypt' => 'openssl/openssl.php',
'openssl_cms_encrypt' => 'openssl/openssl.php',
'openssl_cms_read' => 'openssl/openssl.php',
@@ -2625,6 +2644,7 @@ final class PhpStormStubsMap
'sodium_crypto_stream_xchacha20' => 'sodium/sodium.php',
'sodium_crypto_stream_xchacha20_keygen' => 'sodium/sodium.php',
'sodium_crypto_stream_xchacha20_xor' => 'sodium/sodium.php',
+ 'sodium_crypto_stream_xchacha20_xor_ic' => 'sodium/sodium.php',
'sodium_crypto_stream_xor' => 'sodium/sodium.php',
'sodium_hex2bin' => 'sodium/sodium.php',
'sodium_increment' => 'sodium/sodium.php',
@@ -3065,8 +3085,13 @@ final class PhpStormStubsMap
'CRYPT_SHA256' => 'standard/standard_defines.php',
'CRYPT_SHA512' => 'standard/standard_defines.php',
'CRYPT_STD_DES' => 'standard/standard_defines.php',
+ 'CURLALTSVC_H1' => 'curl/curl_d.php',
+ 'CURLALTSVC_H2' => 'curl/curl_d.php',
+ 'CURLALTSVC_H3' => 'curl/curl_d.php',
+ 'CURLALTSVC_READONLYFILE' => 'curl/curl_d.php',
'CURLAUTH_ANY' => 'curl/curl_d.php',
'CURLAUTH_ANYSAFE' => 'curl/curl_d.php',
+ 'CURLAUTH_AWS_SIGV4' => 'curl/curl_d.php',
'CURLAUTH_BASIC' => 'curl/curl_d.php',
'CURLAUTH_BEARER' => 'curl/curl_d.php',
'CURLAUTH_DIGEST' => 'curl/curl_d.php',
@@ -3134,6 +3159,7 @@ final class PhpStormStubsMap
'CURLE_OPERATION_TIMEOUTED' => 'curl/curl_d.php',
'CURLE_OUT_OF_MEMORY' => 'curl/curl_d.php',
'CURLE_PARTIAL_FILE' => 'curl/curl_d.php',
+ 'CURLE_PROXY' => 'curl/curl_d.php',
'CURLE_READ_ERROR' => 'curl/curl_d.php',
'CURLE_RECV_ERROR' => 'curl/curl_d.php',
'CURLE_SEND_ERROR' => 'curl/curl_d.php',
@@ -3159,6 +3185,7 @@ final class PhpStormStubsMap
'CURLFTPAUTH_DEFAULT' => 'curl/curl_d.php',
'CURLFTPAUTH_SSL' => 'curl/curl_d.php',
'CURLFTPAUTH_TLS' => 'curl/curl_d.php',
+ 'CURLFTPMETHOD_DEFAULT' => 'curl/curl_d.php',
'CURLFTPMETHOD_MULTICWD' => 'curl/curl_d.php',
'CURLFTPMETHOD_NOCWD' => 'curl/curl_d.php',
'CURLFTPMETHOD_SINGLECWD' => 'curl/curl_d.php',
@@ -3176,6 +3203,8 @@ final class PhpStormStubsMap
'CURLGSSAPI_DELEGATION_POLICY_FLAG' => 'curl/curl_d.php',
'CURLHEADER_SEPARATE' => 'curl/curl_d.php',
'CURLHEADER_UNIFIED' => 'curl/curl_d.php',
+ 'CURLHSTS_ENABLE' => 'curl/curl_d.php',
+ 'CURLHSTS_READONLYFILE' => 'curl/curl_d.php',
'CURLINFO_APPCONNECT_TIME' => 'curl/curl_d.php',
'CURLINFO_APPCONNECT_TIME_T' => 'curl/curl_d.php',
'CURLINFO_CERTINFO' => 'curl/curl_d.php',
@@ -3188,6 +3217,7 @@ final class PhpStormStubsMap
'CURLINFO_CONTENT_LENGTH_UPLOAD_T' => 'curl/curl_d.php',
'CURLINFO_CONTENT_TYPE' => 'curl/curl_d.php',
'CURLINFO_COOKIELIST' => 'curl/curl_d.php',
+ 'CURLINFO_EFFECTIVE_METHOD' => 'curl/curl_d.php',
'CURLINFO_EFFECTIVE_URL' => 'curl/curl_d.php',
'CURLINFO_FILETIME' => 'curl/curl_d.php',
'CURLINFO_FILETIME_T' => 'curl/curl_d.php',
@@ -3212,13 +3242,16 @@ final class PhpStormStubsMap
'CURLINFO_PRIVATE' => 'curl/curl_d.php',
'CURLINFO_PROTOCOL' => 'curl/curl_d.php',
'CURLINFO_PROXYAUTH_AVAIL' => 'curl/curl_d.php',
+ 'CURLINFO_PROXY_ERROR' => 'curl/curl_d.php',
'CURLINFO_PROXY_SSL_VERIFYRESULT' => 'curl/curl_d.php',
'CURLINFO_REDIRECT_COUNT' => 'curl/curl_d.php',
'CURLINFO_REDIRECT_TIME' => 'curl/curl_d.php',
'CURLINFO_REDIRECT_TIME_T' => 'curl/curl_d.php',
'CURLINFO_REDIRECT_URL' => 'curl/curl_d.php',
+ 'CURLINFO_REFERER' => 'curl/curl_d.php',
'CURLINFO_REQUEST_SIZE' => 'curl/curl_d.php',
'CURLINFO_RESPONSE_CODE' => 'curl/curl_d.php',
+ 'CURLINFO_RETRY_AFTER' => 'curl/curl_d.php',
'CURLINFO_RTSP_CLIENT_CSEQ' => 'curl/curl_d.php',
'CURLINFO_RTSP_CSEQ_RECV' => 'curl/curl_d.php',
'CURLINFO_RTSP_SERVER_CSEQ' => 'curl/curl_d.php',
@@ -3241,6 +3274,7 @@ final class PhpStormStubsMap
'CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php',
'CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php',
'CURLMOPT_MAXCONNECTS' => 'curl/curl_d.php',
+ 'CURLMOPT_MAX_CONCURRENT_STREAMS' => 'curl/curl_d.php',
'CURLMOPT_MAX_HOST_CONNECTIONS' => 'curl/curl_d.php',
'CURLMOPT_MAX_PIPELINE_LENGTH' => 'curl/curl_d.php',
'CURLMOPT_MAX_TOTAL_CONNECTIONS' => 'curl/curl_d.php',
@@ -3258,11 +3292,15 @@ final class PhpStormStubsMap
'CURLOPT_ACCEPTTIMEOUT_MS' => 'curl/curl_d.php',
'CURLOPT_ACCEPT_ENCODING' => 'curl/curl_d.php',
'CURLOPT_ADDRESS_SCOPE' => 'curl/curl_d.php',
+ 'CURLOPT_ALTSVC' => 'curl/curl_d.php',
+ 'CURLOPT_ALTSVC_CTRL' => 'curl/curl_d.php',
'CURLOPT_APPEND' => 'curl/curl_d.php',
'CURLOPT_AUTOREFERER' => 'curl/curl_d.php',
+ 'CURLOPT_AWS_SIGV4' => 'curl/curl_d.php',
'CURLOPT_BINARYTRANSFER' => 'curl/curl_d.php',
'CURLOPT_BUFFERSIZE' => 'curl/curl_d.php',
'CURLOPT_CAINFO' => 'curl/curl_d.php',
+ 'CURLOPT_CAINFO_BLOB' => 'curl/curl_d.php',
'CURLOPT_CAPATH' => 'curl/curl_d.php',
'CURLOPT_CERTINFO' => 'curl/curl_d.php',
'CURLOPT_CLOSEPOLICY' => 'curl/curl_d.php',
@@ -3288,6 +3326,9 @@ final class PhpStormStubsMap
'CURLOPT_DNS_SERVERS' => 'curl/curl_d.php',
'CURLOPT_DNS_SHUFFLE_ADDRESSES' => 'curl/curl_d.php',
'CURLOPT_DNS_USE_GLOBAL_CACHE' => 'curl/curl_d.php',
+ 'CURLOPT_DOH_SSL_VERIFYHOST' => 'curl/curl_d.php',
+ 'CURLOPT_DOH_SSL_VERIFYPEER' => 'curl/curl_d.php',
+ 'CURLOPT_DOH_SSL_VERIFYSTATUS' => 'curl/curl_d.php',
'CURLOPT_DOH_URL' => 'curl/curl_d.php',
'CURLOPT_EGDSOCKET' => 'curl/curl_d.php',
'CURLOPT_ENCODING' => 'curl/curl_d.php',
@@ -3321,6 +3362,8 @@ final class PhpStormStubsMap
'CURLOPT_HEADER' => 'curl/curl_d.php',
'CURLOPT_HEADERFUNCTION' => 'curl/curl_d.php',
'CURLOPT_HEADEROPT' => 'curl/curl_d.php',
+ 'CURLOPT_HSTS' => 'curl/curl_d.php',
+ 'CURLOPT_HSTS_CTRL' => 'curl/curl_d.php',
'CURLOPT_HTTP09_ALLOWED' => 'curl/curl_d.php',
'CURLOPT_HTTP200ALIASES' => 'curl/curl_d.php',
'CURLOPT_HTTPAUTH' => 'curl/curl_d.php',
@@ -3349,8 +3392,12 @@ final class PhpStormStubsMap
'CURLOPT_MAIL_AUTH' => 'curl/curl_d.php',
'CURLOPT_MAIL_FROM' => 'curl/curl_d.php',
'CURLOPT_MAIL_RCPT' => 'curl/curl_d.php',
+ 'CURLOPT_MAIL_RCPT_ALLLOWFAILS' => 'curl/curl_d.php',
+ 'CURLOPT_MAXAGE_CONN' => 'curl/curl_d.php',
'CURLOPT_MAXCONNECTS' => 'curl/curl_d.php',
'CURLOPT_MAXFILESIZE' => 'curl/curl_d.php',
+ 'CURLOPT_MAXFILESIZE_LARGE' => 'curl/curl_d.php',
+ 'CURLOPT_MAXLIFETIME_CONN' => 'curl/curl_d.php',
'CURLOPT_MAXREDIRS' => 'curl/curl_d.php',
'CURLOPT_MAX_RECV_SPEED_LARGE' => 'curl/curl_d.php',
'CURLOPT_MAX_SEND_SPEED_LARGE' => 'curl/curl_d.php',
@@ -3387,6 +3434,7 @@ final class PhpStormStubsMap
'CURLOPT_PROXYUSERNAME' => 'curl/curl_d.php',
'CURLOPT_PROXYUSERPWD' => 'curl/curl_d.php',
'CURLOPT_PROXY_CAINFO' => 'curl/curl_d.php',
+ 'CURLOPT_PROXY_CAINFO_BLOB' => 'curl/curl_d.php',
'CURLOPT_PROXY_CAPATH' => 'curl/curl_d.php',
'CURLOPT_PROXY_CRLFILE' => 'curl/curl_d.php',
'CURLOPT_PROXY_ISSUERCERT' => 'curl/curl_d.php',
@@ -3429,6 +3477,7 @@ final class PhpStormStubsMap
'CURLOPT_RTSP_STREAM_URI' => 'curl/curl_d.php',
'CURLOPT_RTSP_TRANSPORT' => 'curl/curl_d.php',
'CURLOPT_SAFE_UPLOAD' => 'curl/curl_d.php',
+ 'CURLOPT_SASL_AUTHZID' => 'curl/curl_d.php',
'CURLOPT_SASL_IR' => 'curl/curl_d.php',
'CURLOPT_SERVICE_NAME' => 'curl/curl_d.php',
'CURLOPT_SHARE' => 'curl/curl_d.php',
@@ -3438,6 +3487,7 @@ final class PhpStormStubsMap
'CURLOPT_SSH_AUTH_TYPES' => 'curl/curl_d.php',
'CURLOPT_SSH_COMPRESSION' => 'curl/curl_d.php',
'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' => 'curl/curl_d.php',
+ 'CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256' => 'curl/curl_d.php',
'CURLOPT_SSH_KNOWNHOSTS' => 'curl/curl_d.php',
'CURLOPT_SSH_PRIVATE_KEYFILE' => 'curl/curl_d.php',
'CURLOPT_SSH_PUBLIC_KEYFILE' => 'curl/curl_d.php',
@@ -3453,6 +3503,7 @@ final class PhpStormStubsMap
'CURLOPT_SSLKEY_BLOB' => 'curl/curl_d.php',
'CURLOPT_SSLVERSION' => 'curl/curl_d.php',
'CURLOPT_SSL_CIPHER_LIST' => 'curl/curl_d.php',
+ 'CURLOPT_SSL_EC_CURVES' => 'curl/curl_d.php',
'CURLOPT_SSL_ENABLE_ALPN' => 'curl/curl_d.php',
'CURLOPT_SSL_ENABLE_NPN' => 'curl/curl_d.php',
'CURLOPT_SSL_FALSESTART' => 'curl/curl_d.php',
@@ -3485,7 +3536,9 @@ final class PhpStormStubsMap
'CURLOPT_TRANSFER_ENCODING' => 'curl/curl_d.php',
'CURLOPT_UNIX_SOCKET_PATH' => 'curl/curl_d.php',
'CURLOPT_UNRESTRICTED_AUTH' => 'curl/curl_d.php',
+ 'CURLOPT_UPKEEP_INTERVAL_MS' => 'curl/curl_d.php',
'CURLOPT_UPLOAD' => 'curl/curl_d.php',
+ 'CURLOPT_UPLOAD_BUFFERSIZE' => 'curl/curl_d.php',
'CURLOPT_URL' => 'curl/curl_d.php',
'CURLOPT_USERAGENT' => 'curl/curl_d.php',
'CURLOPT_USERNAME' => 'curl/curl_d.php',
@@ -3495,6 +3548,7 @@ final class PhpStormStubsMap
'CURLOPT_WILDCARDMATCH' => 'curl/curl_d.php',
'CURLOPT_WRITEFUNCTION' => 'curl/curl_d.php',
'CURLOPT_WRITEHEADER' => 'curl/curl_d.php',
+ 'CURLOPT_XFERINFOFUNCTION' => 'curl/curl_d.php',
'CURLOPT_XOAUTH2_BEARER' => 'curl/curl_d.php',
'CURLPAUSE_ALL' => 'curl/curl_d.php',
'CURLPAUSE_CONT' => 'curl/curl_d.php',
@@ -3517,6 +3571,7 @@ final class PhpStormStubsMap
'CURLPROTO_IMAPS' => 'curl/curl_d.php',
'CURLPROTO_LDAP' => 'curl/curl_d.php',
'CURLPROTO_LDAPS' => 'curl/curl_d.php',
+ 'CURLPROTO_MQTT' => 'curl/curl_d.php',
'CURLPROTO_POP3' => 'curl/curl_d.php',
'CURLPROTO_POP3S' => 'curl/curl_d.php',
'CURLPROTO_RTMP' => 'curl/curl_d.php',
@@ -3541,6 +3596,40 @@ final class PhpStormStubsMap
'CURLPROXY_SOCKS4A' => 'curl/curl_d.php',
'CURLPROXY_SOCKS5' => 'curl/curl_d.php',
'CURLPROXY_SOCKS5_HOSTNAME' => 'curl/curl_d.php',
+ 'CURLPX_BAD_ADDRESS_TYPE' => 'curl/curl_d.php',
+ 'CURLPX_BAD_VERSION' => 'curl/curl_d.php',
+ 'CURLPX_CLOSED' => 'curl/curl_d.php',
+ 'CURLPX_GSSAPI' => 'curl/curl_d.php',
+ 'CURLPX_GSSAPI_PERMSG' => 'curl/curl_d.php',
+ 'CURLPX_GSSAPI_PROTECTION' => 'curl/curl_d.php',
+ 'CURLPX_IDENTD' => 'curl/curl_d.php',
+ 'CURLPX_IDENTD_DIFFER' => 'curl/curl_d.php',
+ 'CURLPX_LONG_HOSTNAME' => 'curl/curl_d.php',
+ 'CURLPX_LONG_PASSWD' => 'curl/curl_d.php',
+ 'CURLPX_LONG_USER' => 'curl/curl_d.php',
+ 'CURLPX_NO_AUTH' => 'curl/curl_d.php',
+ 'CURLPX_OK' => 'curl/curl_d.php',
+ 'CURLPX_RECV_ADDRESS' => 'curl/curl_d.php',
+ 'CURLPX_RECV_AUTH' => 'curl/curl_d.php',
+ 'CURLPX_RECV_CONNECT' => 'curl/curl_d.php',
+ 'CURLPX_RECV_REQACK' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_COMMAND_NOT_SUPPORTED' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_CONNECTION_REFUSED' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_GENERAL_SERVER_FAILURE' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_HOST_UNREACHABLE' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_NETWORK_UNREACHABLE' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_NOT_ALLOWED' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_TTL_EXPIRED' => 'curl/curl_d.php',
+ 'CURLPX_REPLY_UNASSIGNED' => 'curl/curl_d.php',
+ 'CURLPX_REQUEST_FAILED' => 'curl/curl_d.php',
+ 'CURLPX_RESOLVE_HOST' => 'curl/curl_d.php',
+ 'CURLPX_SEND_AUTH' => 'curl/curl_d.php',
+ 'CURLPX_SEND_CONNECT' => 'curl/curl_d.php',
+ 'CURLPX_SEND_REQUEST' => 'curl/curl_d.php',
+ 'CURLPX_UNKNOWN_FAIL' => 'curl/curl_d.php',
+ 'CURLPX_UNKNOWN_MODE' => 'curl/curl_d.php',
+ 'CURLPX_USER_REJECTED' => 'curl/curl_d.php',
'CURLSHOPT_NONE' => 'curl/curl_d.php',
'CURLSHOPT_SHARE' => 'curl/curl_d.php',
'CURLSHOPT_UNSHARE' => 'curl/curl_d.php',
@@ -3554,7 +3643,11 @@ final class PhpStormStubsMap
'CURLSSH_AUTH_PASSWORD' => 'curl/curl_d.php',
'CURLSSH_AUTH_PUBLICKEY' => 'curl/curl_d.php',
'CURLSSLOPT_ALLOW_BEAST' => 'curl/curl_d.php',
+ 'CURLSSLOPT_AUTO_CLIENT_CERT' => 'curl/curl_d.php',
+ 'CURLSSLOPT_NATIVE_CA' => 'curl/curl_d.php',
+ 'CURLSSLOPT_NO_PARTIALCHAIN' => 'curl/curl_d.php',
'CURLSSLOPT_NO_REVOKE' => 'curl/curl_d.php',
+ 'CURLSSLOPT_REVOKE_BEST_EFFORT' => 'curl/curl_d.php',
'CURLUSESSL_ALL' => 'curl/curl_d.php',
'CURLUSESSL_CONTROL' => 'curl/curl_d.php',
'CURLUSESSL_NONE' => 'curl/curl_d.php',
@@ -3625,9 +3718,12 @@ final class PhpStormStubsMap
'CURL_VERSION_CONV' => 'curl/curl_d.php',
'CURL_VERSION_CURLDEBUG' => 'curl/curl_d.php',
'CURL_VERSION_DEBUG' => 'curl/curl_d.php',
+ 'CURL_VERSION_GSASL' => 'curl/curl_d.php',
'CURL_VERSION_GSSAPI' => 'curl/curl_d.php',
'CURL_VERSION_GSSNEGOTIATE' => 'curl/curl_d.php',
+ 'CURL_VERSION_HSTS' => 'curl/curl_d.php',
'CURL_VERSION_HTTP2' => 'curl/curl_d.php',
+ 'CURL_VERSION_HTTP3' => 'curl/curl_d.php',
'CURL_VERSION_HTTPS_PROXY' => 'curl/curl_d.php',
'CURL_VERSION_IDN' => 'curl/curl_d.php',
'CURL_VERSION_IPV6' => 'curl/curl_d.php',
@@ -3643,11 +3739,15 @@ final class PhpStormStubsMap
'CURL_VERSION_SSL' => 'curl/curl_d.php',
'CURL_VERSION_SSPI' => 'curl/curl_d.php',
'CURL_VERSION_TLSAUTH_SRP' => 'curl/curl_d.php',
+ 'CURL_VERSION_UNICODE' => 'curl/curl_d.php',
'CURL_VERSION_UNIX_SOCKETS' => 'curl/curl_d.php',
+ 'CURL_VERSION_ZSTD' => 'curl/curl_d.php',
'CURL_WRITEFUNC_PAUSE' => 'curl/curl_d.php',
+ 'CURRENCY_SYMBOL' => 'standard/standard_defines.php',
'DATE_ATOM' => 'date/date_d.php',
'DATE_COOKIE' => 'date/date_d.php',
'DATE_ISO8601' => 'date/date_d.php',
+ 'DATE_ISO8601_EXPANDED' => 'date/date_d.php',
'DATE_RFC1036' => 'date/date_d.php',
'DATE_RFC1123' => 'date/date_d.php',
'DATE_RFC2822' => 'date/date_d.php',
@@ -3665,8 +3765,11 @@ final class PhpStormStubsMap
'DAY_5' => 'standard/standard_defines.php',
'DAY_6' => 'standard/standard_defines.php',
'DAY_7' => 'standard/standard_defines.php',
+ 'DBA_LMDB_NO_SUB_DIR' => 'dba/dba.php',
+ 'DBA_LMDB_USE_SUB_DIR' => 'dba/dba.php',
'DEBUG_BACKTRACE_IGNORE_ARGS' => 'Core/Core_d.php',
'DEBUG_BACKTRACE_PROVIDE_OBJECT' => 'Core/Core_d.php',
+ 'DECIMAL_POINT' => 'standard/standard_defines.php',
'DEFAULT_INCLUDE_PATH' => 'Core/Core_d.php',
'DIRECTORY_SEPARATOR' => 'standard/standard_defines.php',
'DNS_A' => 'standard/standard_defines.php',
@@ -3725,6 +3828,7 @@ final class PhpStormStubsMap
'ERA_D_FMT' => 'standard/standard_defines.php',
'ERA_D_T_FMT' => 'standard/standard_defines.php',
'ERA_T_FMT' => 'standard/standard_defines.php',
+ 'ERA_YEAR' => 'standard/standard_defines.php',
'EXIF_USE_MBSTRING' => 'exif/exif.php',
'EXTR_IF_EXISTS' => 'standard/standard_defines.php',
'EXTR_OVERWRITE' => 'standard/standard_defines.php',
@@ -3750,6 +3854,7 @@ final class PhpStormStubsMap
'E_USER_NOTICE' => 'Core/Core_d.php',
'E_USER_WARNING' => 'Core/Core_d.php',
'E_WARNING' => 'Core/Core_d.php',
+ 'FILEINFO_APPLE' => 'fileinfo/fileinfo.php',
'FILEINFO_CONTINUE' => 'fileinfo/fileinfo.php',
'FILEINFO_DEVICES' => 'fileinfo/fileinfo.php',
'FILEINFO_EXTENSION' => 'fileinfo/fileinfo.php',
@@ -3779,6 +3884,7 @@ final class PhpStormStubsMap
'FILTER_FLAG_ENCODE_AMP' => 'filter/filter.php',
'FILTER_FLAG_ENCODE_HIGH' => 'filter/filter.php',
'FILTER_FLAG_ENCODE_LOW' => 'filter/filter.php',
+ 'FILTER_FLAG_GLOBAL_RANGE' => 'filter/filter.php',
'FILTER_FLAG_HOSTNAME' => 'filter/filter.php',
'FILTER_FLAG_HOST_REQUIRED' => 'filter/filter.php',
'FILTER_FLAG_IPV4' => 'filter/filter.php',
@@ -3833,6 +3939,7 @@ final class PhpStormStubsMap
'FPE_FLTUND' => 'pcntl/pcntl.php',
'FPE_INTDIV' => 'pcntl/pcntl.php',
'FPE_INTOVF' => 'pcntl/pcntl.php',
+ 'FRAC_DIGITS' => 'standard/standard_defines.php',
'FTP_ASCII' => 'ftp/ftp.php',
'FTP_AUTORESUME' => 'ftp/ftp.php',
'FTP_AUTOSEEK' => 'ftp/ftp.php',
@@ -3876,6 +3983,7 @@ final class PhpStormStubsMap
'GRAPHEME_EXTR_COUNT' => 'intl/intl.php',
'GRAPHEME_EXTR_MAXBYTES' => 'intl/intl.php',
'GRAPHEME_EXTR_MAXCHARS' => 'intl/intl.php',
+ 'GROUPING' => 'standard/standard_defines.php',
'HASH_HMAC' => 'hash/hash.php',
'HTML_ENTITIES' => 'standard/standard_defines.php',
'HTML_SPECIALCHARS' => 'standard/standard_defines.php',
@@ -4110,6 +4218,8 @@ final class PhpStormStubsMap
'INTL_IDNA_VARIANT_2003' => 'intl/intl.php',
'INTL_IDNA_VARIANT_UTS46' => 'intl/intl.php',
'INTL_MAX_LOCALE_LEN' => 'intl/intl.php',
+ 'INT_CURR_SYMBOL' => 'standard/standard_defines.php',
+ 'INT_FRAC_DIGITS' => 'standard/standard_defines.php',
'IPPROTO_IP' => 'sockets/sockets.php',
'IPPROTO_IPV6' => 'sockets/sockets.php',
'IPV6_HOPLIMIT' => 'sockets/sockets.php',
@@ -4450,6 +4560,9 @@ final class PhpStormStubsMap
'MON_7' => 'standard/standard_defines.php',
'MON_8' => 'standard/standard_defines.php',
'MON_9' => 'standard/standard_defines.php',
+ 'MON_DECIMAL_POINT' => 'standard/standard_defines.php',
+ 'MON_GROUPING' => 'standard/standard_defines.php',
+ 'MON_THOUSANDS_SEP' => 'standard/standard_defines.php',
'MSG_CMSG_CLOEXEC' => 'sockets/sockets.php',
'MSG_CONFIRM' => 'sockets/sockets.php',
'MSG_CTRUNC' => 'sockets/sockets.php',
@@ -4470,6 +4583,7 @@ final class PhpStormStubsMap
'MSG_TRUNC' => 'sockets/sockets.php',
'MSG_WAITALL' => 'sockets/sockets.php',
'MSG_WAITFORONE' => 'sockets/sockets.php',
+ 'MSG_ZEROCOPY' => 'sockets/sockets.php',
'MSSQL_ASSOC' => 'mssql/mssql.php',
'MSSQL_BOTH' => 'mssql/mssql.php',
'MSSQL_NUM' => 'mssql/mssql.php',
@@ -4614,9 +4728,13 @@ final class PhpStormStubsMap
'M_SQRT3' => 'standard/standard_defines.php',
'M_SQRTPI' => 'standard/standard_defines.php',
'NAN' => 'standard/standard_defines.php',
+ 'NEGATIVE_SIGN' => 'standard/standard_defines.php',
'NIL' => 'imap/imap.php',
'NOEXPR' => 'standard/standard_defines.php',
'NOSTR' => 'standard/standard_defines.php',
+ 'N_CS_PRECEDES' => 'standard/standard_defines.php',
+ 'N_SEP_BY_SPACE' => 'standard/standard_defines.php',
+ 'N_SIGN_POSN' => 'standard/standard_defines.php',
'OCI_ASSOC' => 'oci8/oci8.php',
'OCI_BOTH' => 'oci8/oci8.php',
'OCI_B_BFILE' => 'oci8/oci8.php',
@@ -4928,6 +5046,7 @@ final class PhpStormStubsMap
'POLL_MSG' => 'pcntl/pcntl.php',
'POLL_OUT' => 'pcntl/pcntl.php',
'POLL_PRI' => 'pcntl/pcntl.php',
+ 'POSITIVE_SIGN' => 'standard/standard_defines.php',
'POSIX_F_OK' => 'posix/posix.php',
'POSIX_RLIMIT_AS' => 'posix/posix.php',
'POSIX_RLIMIT_CORE' => 'posix/posix.php',
@@ -4982,6 +5101,9 @@ final class PhpStormStubsMap
'PSPELL_FAST' => 'pspell/pspell.php',
'PSPELL_NORMAL' => 'pspell/pspell.php',
'PSPELL_RUN_TOGETHER' => 'pspell/pspell.php',
+ 'P_CS_PRECEDES' => 'standard/standard_defines.php',
+ 'P_SEP_BY_SPACE' => 'standard/standard_defines.php',
+ 'P_SIGN_POSN' => 'standard/standard_defines.php',
'RADIXCHAR' => 'standard/standard_defines.php',
'READLINE_LIB' => 'readline/readline.php',
'SA_ALL' => 'imap/imap.php',
@@ -5055,6 +5177,24 @@ final class PhpStormStubsMap
'SI_TIMER' => 'pcntl/pcntl.php',
'SI_TKILL' => 'pcntl/pcntl.php',
'SI_USER' => 'pcntl/pcntl.php',
+ 'SKF_AD_ALU_XOR_X' => 'sockets/sockets.php',
+ 'SKF_AD_CPU' => 'sockets/sockets.php',
+ 'SKF_AD_HATYPE' => 'sockets/sockets.php',
+ 'SKF_AD_IFINDEX' => 'sockets/sockets.php',
+ 'SKF_AD_MARK' => 'sockets/sockets.php',
+ 'SKF_AD_MAX' => 'sockets/sockets.php',
+ 'SKF_AD_NLATTR' => 'sockets/sockets.php',
+ 'SKF_AD_NLATTR_NEST' => 'sockets/sockets.php',
+ 'SKF_AD_OFF' => 'sockets/sockets.php',
+ 'SKF_AD_PAY_OFFSET' => 'sockets/sockets.php',
+ 'SKF_AD_PKTTYPE' => 'sockets/sockets.php',
+ 'SKF_AD_PROTOCOL' => 'sockets/sockets.php',
+ 'SKF_AD_QUEUE' => 'sockets/sockets.php',
+ 'SKF_AD_RANDOM' => 'sockets/sockets.php',
+ 'SKF_AD_RXHASH' => 'sockets/sockets.php',
+ 'SKF_AD_VLAN_TAG' => 'sockets/sockets.php',
+ 'SKF_AD_VLAN_TAG_PRESENT' => 'sockets/sockets.php',
+ 'SKF_AD_VLAN_TPID' => 'sockets/sockets.php',
'SNMP_BIT_STR' => 'snmp/snmp.php',
'SNMP_COUNTER' => 'snmp/snmp.php',
'SNMP_COUNTER64' => 'snmp/snmp.php',
@@ -5334,14 +5474,17 @@ final class PhpStormStubsMap
'SORT_REGULAR' => 'standard/standard_defines.php',
'SORT_STRING' => 'standard/standard_defines.php',
'SO_BINDTODEVICE' => 'sockets/sockets.php',
+ 'SO_BPF_EXTENSIONS' => 'sockets/sockets.php',
'SO_BROADCAST' => 'sockets/sockets.php',
'SO_DEBUG' => 'sockets/sockets.php',
'SO_DONTROUTE' => 'sockets/sockets.php',
'SO_ERROR' => 'sockets/sockets.php',
'SO_FREE' => 'imap/imap.php',
+ 'SO_INCOMING_CPU' => 'sockets/sockets.php',
'SO_KEEPALIVE' => 'sockets/sockets.php',
'SO_LINGER' => 'sockets/sockets.php',
'SO_MARK' => 'sockets/sockets.php',
+ 'SO_MEMINFO' => 'sockets/sockets.php',
'SO_NOSERVER' => 'imap/imap.php',
'SO_OOBINLINE' => 'sockets/sockets.php',
'SO_PASSCRED' => 'sockets/sockets.php',
@@ -5354,6 +5497,7 @@ final class PhpStormStubsMap
'SO_SNDLOWAT' => 'sockets/sockets.php',
'SO_SNDTIMEO' => 'sockets/sockets.php',
'SO_TYPE' => 'sockets/sockets.php',
+ 'SO_ZEROCOPY' => 'sockets/sockets.php',
'SQLBIT' => 'mssql/mssql.php',
'SQLCHAR' => 'mssql/mssql.php',
'SQLFLT4' => 'mssql/mssql.php',
@@ -5564,8 +5708,14 @@ final class PhpStormStubsMap
'S_SESSION' => 'Core/Core_d.php',
'S_SQL' => 'Core/Core_d.php',
'S_VARS' => 'Core/Core_d.php',
+ 'TCP_CONGESTION' => 'sockets/sockets.php',
'TCP_DEFER_ACCEPT' => 'sockets/sockets.php',
+ 'TCP_KEEPCNT' => 'sockets/sockets.php',
+ 'TCP_KEEPIDLE' => 'sockets/sockets.php',
+ 'TCP_KEEPINTVL' => 'sockets/sockets.php',
'TCP_NODELAY' => 'sockets/sockets.php',
+ 'TCP_NOTSENT_LOWAT' => 'sockets/sockets.php',
+ 'THOUSANDS_SEP' => 'standard/standard_defines.php',
'THOUSEP' => 'standard/standard_defines.php',
'TIDY_NODETYPE_ASP' => 'tidy/tidy.php',
'TIDY_NODETYPE_CDATA' => 'tidy/tidy.php',
diff --git a/Reflection/ReflectionClass.php b/Reflection/ReflectionClass.php
index 520f1701e..d9673471b 100644
--- a/Reflection/ReflectionClass.php
+++ b/Reflection/ReflectionClass.php
@@ -34,6 +34,11 @@ class ReflectionClass implements Reflector
*/
public const IS_FINAL = 32;
+ /**
+ * @since 8.2
+ */
+ public const IS_READONLY = 65536;
+
/**
* @var class-string
+ * @param Traversable|array $iterator
* The iterator being copied.
*
@@ -144,18 +144,18 @@ function spl_object_hash(object $object): string {}
*
+ * @param Traversable|array $iterator
* The iterator being counted.
*
+ * @param mixed $text
* The tested string.
*
@@ -405,6 +414,10 @@ public function getTimezone(): DateTimeZone|false {}
*/
#[TentativeType]
public function __wakeup(): void {}
+
+ public function __serialize(): array {}
+
+ public function __unserialize(array $data): void {}
}
/**
@@ -515,7 +528,7 @@ public function __construct(string $datetime = 'now', DateTimeZone|null $timezon
* @since 7.3
*/
#[TentativeType]
- public static function createFromImmutable(DateTimeImmutable $object): DateTime {}
+ public static function createFromImmutable(DateTimeImmutable $object): static {}
/**
* Parse a string into a new DateTime object according to the specified format
@@ -681,6 +694,10 @@ public function getTimestamp(): int {}
*/
#[TentativeType]
public function diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval {}
+
+ public function __serialize(): array {}
+
+ public function __unserialize(array $data): void {}
}
/**
@@ -771,6 +788,10 @@ public function getTransitions(int $timestampBegin = null, int $timestampEnd = n
*/
#[TentativeType]
public function __wakeup(): void {}
+
+ public function __serialize(): array {}
+
+ public function __unserialize(array $data): void {}
}
/**
@@ -866,6 +887,10 @@ public function format(string $format): string {}
#[TentativeType]
public function __wakeup(): void {}
+
+ public function __serialize(): array {}
+
+ public function __unserialize(array $data): void {}
}
/**
@@ -879,46 +904,51 @@ class DatePeriod implements IteratorAggregate
{
public const EXCLUDE_START_DATE = 1;
+ /**
+ * @since 8.2
+ */
+ public const INCLUDE_END_DATE = 2;
+
/**
* Start date
- * @var DateTimeInterface
+ * @var DateTimeInterface|null
*/
#[Immutable]
- public $start;
+ public DateTimeInterface|null $start;
/**
* Current iterator value.
* @var DateTimeInterface|null
*/
- public $current;
+ public DateTimeInterface|null $current;
/**
* End date.
* @var DateTimeInterface|null
*/
#[Immutable]
- public $end;
+ public DateTimeInterface|null $end;
/**
* The interval
- * @var DateInterval
+ * @var DateInterval|null
*/
#[Immutable]
- public $interval;
+ public DateInterval|null $interval;
/**
* Number of recurrences.
* @var int
*/
#[Immutable]
- public $recurrences;
+ public int $recurrences;
/**
* Start of period.
* @var bool
*/
#[Immutable]
- public $include_start_date;
+ public bool $include_start_date;
/**
* @since 8.2
@@ -1000,4 +1030,8 @@ public function getRecurrences(): ?int {}
* @since 8.0
*/
public function getIterator(): Iterator {}
+
+ public function __serialize(): array {}
+
+ public function __unserialize(array $data): void {}
}
diff --git a/date/date_d.php b/date/date_d.php
index ace1d7eaf..fce1a37e5 100644
--- a/date/date_d.php
+++ b/date/date_d.php
@@ -11,6 +11,9 @@
*/
define('DATE_ISO8601', "Y-m-d\TH:i:sO");
+/** @since 8.2 */
+define('DATE_ISO8601_EXPANDED', "X-m-d\TH:i:sP");
+
define('DATE_RFC822', "D, d M y H:i:s O");
define('DATE_RFC850', "l, d-M-y H:i:s T");
diff --git a/dba/dba.php b/dba/dba.php
index 27837c3f1..92bbdc12f 100644
--- a/dba/dba.php
+++ b/dba/dba.php
@@ -1,146 +1,14 @@
- * Commonly a regular path in your filesystem.
- *
- * It is r for read access, w for - * read/write access to an already existing database, c - * for read/write access and database creation if it doesn't currently exist, - * and n for create, truncate and read/write access. - * The database is created in BTree mode, other modes (like Hash or Queue) - * are not supported. - *
- *- * Additionally you can set the database lock method with the next char. - * Use l to lock the database with a .lck - * file or d to lock the databasefile itself. It is - * important that all of your applications do this consistently. - *
- *- * If you want to test the access and do not want to wait for the lock - * you can add t as third character. When you are - * absolutely sure that you do not require database locking you can do - * so by using - instead of l or - * d. When none of d, - * l or - is used, dba will lock - * on the database file as it would with d. - *
- *- * There can only be one writer for one database file. When you use dba on - * a web server and more than one request requires write operations they can - * only be done one after another. Also read during write is not allowed. - * The dba extension uses locks to prevent this. See the following table: - *
already open | - *mode = "rl" | - *mode = "rlt" | - *mode = "wl" | - *mode = "wlt" | - *mode = "rd" | - *mode = "rdt" | - *mode = "wd" | - *mode = "wdt" | - *
not open | - *ok | - *ok | - *ok | - *ok | - *ok | - *ok | - *ok | - *ok | - *
mode = "rl" | - *ok | - *ok | - *wait | - *false | - *illegal | - *illegal | - *illegal | - *illegal | - *
mode = "wl" | - *wait | - *false | - *wait | - *false | - *illegal | - *illegal | - *illegal | - *illegal | - *
mode = "rd" | - *illegal | - *illegal | - *illegal | - *illegal | - *ok | - *ok | - *wait | - *false | - *
mode = "wd" | - *illegal | - *illegal | - *illegal | - *illegal | - *wait | - *false | - *wait | - *false | - *
- * The name of the handler which - * shall be used for accessing path. It is passed - * all optional parameters given to dba_open and - * can act on behalf of them. - *
- * @param mixed ...$handler_params [optional] - * @return resource|false a positive handle on success or FALSE on failure. - */ -function dba_open($path, $mode, $handler, ...$handler_params) {} +/** @since 8.2 */ +define('DBA_LMDB_USE_SUB_DIR', 0); -/** - * Open database persistently - * @link https://php.net/manual/en/function.dba-popen.php - * @param string $path- * Commonly a regular path in your filesystem. - *
- * @param string $mode- * It is r for read access, w for - * read/write access to an already existing database, c - * for read/write access and database creation if it doesn't currently exist, - * and n for create, truncate and read/write access. - *
- * @param string $handler [optional]- * The name of the handler which - * shall be used for accessing path. It is passed - * all optional parameters given to dba_popen and - * can act on behalf of them. - *
- * @param mixed ...$handler_params [optional] - * @return resource|false a positive handle on success or FALSE on failure. - */ -function dba_popen($path, $mode, $handler, ...$handler_params) {} +/** @since 8.2 */ +define('DBA_LMDB_NO_SUB_DIR', 0); + +function dba_open(string $path, string $mode, ?string $handler = null, int $permission = 420, int $map_size = 0, ?int $flags = null) {} + +function dba_popen(string $path, string $mode, ?string $handler = null, int $permission = 420, int $map_size = 0, ?int $flags = null) {} /** * Close a DBA database @@ -165,7 +33,7 @@ function dba_close($dba): void {} * * @return bool TRUE on success or FALSE on failure. */ -function dba_delete($key, $dba): bool {} +function dba_delete(array|string $key, $dba): bool {} /** * Check whether key exists @@ -179,7 +47,7 @@ function dba_delete($key, $dba): bool {} * * @return bool TRUE if the key exists, FALSE otherwise. */ -function dba_exists($key, $dba): bool {} +function dba_exists(array|string $key, $dba): bool {} /** * Fetch data specified by key @@ -239,7 +107,7 @@ function dba_fetch($key, $skip, $dba): string|false {} * * @return bool TRUE on success or FALSE on failure. */ -function dba_insert($key, string $value, $dba): bool {} +function dba_insert(array|string $key, string $value, $dba): bool {} /** * Replace or insert entry @@ -256,7 +124,7 @@ function dba_insert($key, string $value, $dba): bool {} * * @return bool TRUE on success or FALSE on failure. */ -function dba_replace($key, string $value, $dba): bool {} +function dba_replace(array|string $key, string $value, $dba): bool {} /** * Fetch first key diff --git a/fileinfo/fileinfo.php b/fileinfo/fileinfo.php index 39b94edf4..94b548351 100644 --- a/fileinfo/fileinfo.php +++ b/fileinfo/fileinfo.php @@ -67,6 +67,11 @@ */ define('FILEINFO_EXTENSION', 2097152); +/** + * @since 8.2 + */ +define('FILEINFO_APPLE', 2048); + /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* Value of alpha component. *
- * @return bool|null + * @return false|null */ -function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): null|bool {} +function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): ?false {} /** * Define a color as transparent diff --git a/libxml/libxml.php b/libxml/libxml.php index ec3ad4dcb..079db47a6 100644 --- a/libxml/libxml.php +++ b/libxml/libxml.php @@ -270,6 +270,17 @@ function libxml_disable_entity_loader(bool $disable = true): bool {} */ function libxml_set_external_entity_loader(?callable $resolver_function): bool {} +/** + * Returns the currently installed external entity loader, i.e. the value which was passed to + * libxml_set_external_entity_loader() or null if no loader was installed and the default entity loader will be used. + * This allows libraries to save and restore the loader, controlling entity expansion without interfering with the rest + * of the application. + * + * @return callable|null + * @since 8.2 + */ +function libxml_get_external_entity_loader(): ?callable {} + /** * Contains various information about errors thrown by libxml. The error codes * are described within the official diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index 1d2639f64..edf960ac1 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -213,12 +213,12 @@ function mb_http_output(?string $encoding): string|bool {} ** Useless detect order example *
- * @return bool|string[] When setting the encoding detection order, + * @return true|string[] When setting the encoding detection order, * true is returned on success or FALSE on failure. * When getting the encoding detection order, an ordered array * of the encodings is returned. */ -function mb_detect_order(array|string|null $encoding = null): array|bool {} +function mb_detect_order(array|string|null $encoding = null): array|true {} /** * Set/Get substitution character diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php index 67db5ea11..3676f39a6 100644 --- a/mysqli/mysqli.php +++ b/mysqli/mysqli.php @@ -749,9 +749,9 @@ function mysqli_character_set_name(mysqli $mysql): string {} * Closes a previously opened database connection * @link https://php.net/manual/en/mysqli.close.php * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init() - * @return bool + * @return true */ -function mysqli_close(mysqli $mysql): bool {} +function mysqli_close(mysqli $mysql): true {} /** * Commits the current transaction @@ -813,9 +813,9 @@ function mysqli_dump_debug_info(mysqli $mysql): bool {} * Performs debugging operations using the Fred Fish debugging library. * @link https://php.net/manual/en/mysqli.debug.php * @param string $options - * @return bool + * @return true */ -function mysqli_debug(string $options): bool {} +function mysqli_debug(string $options): true {} /** * Returns the error code for the most recent function call @@ -874,6 +874,15 @@ function mysqli_stmt_execute(mysqli_stmt $statement, ?array $params = null): boo #[Deprecated(since: "5.3")] function mysqli_execute(mysqli_stmt $statement, ?array $params = null): bool {} +/** + * @param mysqli $mysql + * @param string $query + * @param array|null $params + * @return mysqli_result|bool + * @since 8.2 + */ +function mysqli_execute_query(mysqli $mysql, string $query, ?array $params = null): mysqli_result|bool {} + /** * Returns the next field in the result set * @link https://secure.php.net/manual/en/mysqli-result.fetch-field.php @@ -1630,17 +1639,17 @@ function mysqli_stat(mysqli $mysql): string|false {} * @param string|null $ca_certificate The path name to the certificate authority file * @param string|null $ca_path The pathname to a directory that contains trusted SSL CA certificates in PEM format * @param string|null $cipher_algos A list of allowable ciphers to use for SSL encryption - * @return bool This function always returns TRUE value. + * @return true This function always returns TRUE value. */ -function mysqli_ssl_set(mysqli $mysql, string|null $key, string|null $certificate, string|null $ca_certificate, string|null $ca_path, string|null $cipher_algos): bool {} +function mysqli_ssl_set(mysqli $mysql, string|null $key, string|null $certificate, string|null $ca_certificate, string|null $ca_path, string|null $cipher_algos): true {} /** * Closes a prepared statement * @link https://php.net/manual/en/mysqli-stmt.close.php * @param mysqli_stmt $statement - * @return bool + * @return true */ -function mysqli_stmt_close(mysqli_stmt $statement): bool {} +function mysqli_stmt_close(mysqli_stmt $statement): true {} /** * Seeks to an arbitrary row in statement result set @@ -2168,6 +2177,16 @@ public function debug(string $options) {} #[TentativeType] public function get_charset(): ?object {} + /** + * @param mysqli $mysql + * @param string $query + * @param array|null $params + * @return mysqli_result|bool + * @see mysqli_execute_query + * @since 8.2 + */ + public function execute_query(string $query, ?array $params = null): mysqli_result|bool {} + /** * Returns the MySQL client version as a string * @link https://php.net/manual/en/mysqli.get-client-info.php diff --git a/openssl/openssl.php b/openssl/openssl.php index 14bc6d951..9366bb688 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -905,6 +905,15 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, */ function openssl_cipher_iv_length(string $cipher_algo): int|false {} +/** + * This function works in exactly the same way as openssl_cipher_iv_length but for a key length. This is especially + * useful to make sure that the right key length is provided to openssl_encrypt and openssl_decrypt. + * @param string $cipher_algo + * @return int|false + * @since 8.2 + */ +function openssl_cipher_key_length(string $cipher_algo): int|false {} + /** * Generate signature * @link https://php.net/manual/en/function.openssl-sign.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f55cf2cfd..0b29376f5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,11 @@- * Use one of the following constants to specify the implementation of the algorithm to use. - *
- * @return void - */ -function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} - -/** - * Seed the random number generator - *Note: As of PHP 7.1.0, {@see srand()} has been made - * an alias of {@see mt_srand()}. - *
- * @link https://php.net/manual/en/function.srand.php - * @param int $seed- * Optional seed value - *
- * @param int $mode [optional]- * Use one of the following constants to specify the implementation of the algorithm to use. - *
- * @return void - */ -function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} - -/** - * Generate a random integer - * @link https://php.net/manual/en/function.rand.php - * @param int $min - * @param int $max [optional] - * @return int A pseudo random value between min - * (or 0) and max (or getrandmax, inclusive). - */ -function rand(int $min = null, int $max): int {} - -/** - * Generate a random value via the Mersenne Twister Random Number Generator - * @link https://php.net/manual/en/function.mt-rand.php - * @param int $min- * Optional lowest value to be returned (default: 0) - *
- * @param int $max [optional]- * Optional highest value to be returned (default: mt_getrandmax()) - *
- * @return int A random integer value between min (or 0) - * and max (or mt_getrandmax, inclusive) - */ -function mt_rand(int $min = null, int $max): int {} - -/** - * Show largest possible random value - * @link https://php.net/manual/en/function.mt-getrandmax.php - * @return int the maximum random value returned by mt_rand - */ -#[Pure] -function mt_getrandmax(): int {} - -/** - * Show largest possible random value - * @link https://php.net/manual/en/function.getrandmax.php - * @return int The largest possible random value returned by rand - */ -#[Pure] -function getrandmax(): int {} - -/** - * Generates cryptographically secure pseudo-random bytes - * @link https://php.net/manual/en/function.random-bytes.php - * @param int $length The length of the random string that should be returned in bytes. - * @return string Returns a string containing the requested number of cryptographically secure random bytes. - * @since 7.0 - * @throws Exception if an appropriate source of randomness cannot be found. - */ -function random_bytes(int $length): string {} - -/** - * Generates cryptographically secure pseudo-random integers - * @link https://php.net/manual/en/function.random-int.php - * @param int $min The lowest value to be returned, which must be PHP_INT_MIN or higher. - * @param int $max The highest value to be returned, which must be less than or equal to PHP_INT_MAX. - * @return int Returns a cryptographically secure random integer in the range min to max, inclusive. - * @since 7.0 - * @throws Exception if an appropriate source of randomness cannot be found. - */ -function random_int(int $min, int $max): int {} +namespace { + use JetBrains\PhpStorm\Pure; + + /** + * Combined linear congruential generator + * @link https://php.net/manual/en/function.lcg-value.php + * @return float A pseudo random float value in the range of (0, 1) + * @return float A pseudo random float value in the range of (0, 1) + */ + function lcg_value(): float {} + + /** + * Seeds the Mersenne Twister Random Number Generator + * @link https://php.net/manual/en/function.mt-srand.php + * @param int $seed+ * An optional seed value + *
+ * @param int $mode [optional]+ * Use one of the following constants to specify the implementation of the algorithm to use. + *
+ * @return void + */ + function mt_srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} + + /** + * Seed the random number generator + *Note: As of PHP 7.1.0, {@see srand()} has been made + * an alias of {@see mt_srand()}. + *
+ * @link https://php.net/manual/en/function.srand.php + * @param int $seed+ * Optional seed value + *
+ * @param int $mode [optional]+ * Use one of the following constants to specify the implementation of the algorithm to use. + *
+ * @return void + */ + function srand(int $seed = 0, int $mode = MT_RAND_MT19937): void {} + + /** + * Generate a random integer + * @link https://php.net/manual/en/function.rand.php + * @param int $min + * @param int $max [optional] + * @return int A pseudo random value between min + * (or 0) and max (or getrandmax, inclusive). + */ + function rand(int $min = null, int $max): int {} + + /** + * Generate a random value via the Mersenne Twister Random Number Generator + * @link https://php.net/manual/en/function.mt-rand.php + * @param int $min+ * Optional lowest value to be returned (default: 0) + *
+ * @param int $max [optional]+ * Optional highest value to be returned (default: mt_getrandmax()) + *
+ * @return int A random integer value between min (or 0) + * and max (or mt_getrandmax, inclusive) + */ + function mt_rand(int $min = null, int $max): int {} + + /** + * Show largest possible random value + * @link https://php.net/manual/en/function.mt-getrandmax.php + * @return int the maximum random value returned by mt_rand + */ + #[Pure] + function mt_getrandmax(): int {} + + /** + * Show largest possible random value + * @link https://php.net/manual/en/function.getrandmax.php + * @return int The largest possible random value returned by rand + */ + #[Pure] + function getrandmax(): int {} + + /** + * Generates cryptographically secure pseudo-random bytes + * @link https://php.net/manual/en/function.random-bytes.php + * @param int $length The length of the random string that should be returned in bytes. + * @return string Returns a string containing the requested number of cryptographically secure random bytes. + * @since 7.0 + * @throws Exception if an appropriate source of randomness cannot be found. + */ + function random_bytes(int $length): string {} + + /** + * Generates cryptographically secure pseudo-random integers + * @link https://php.net/manual/en/function.random-int.php + * @param int $min The lowest value to be returned, which must be PHP_INT_MIN or higher. + * @param int $max The highest value to be returned, which must be less than or equal to PHP_INT_MAX. + * @return int Returns a cryptographically secure random integer in the range min to max, inclusive. + * @since 7.0 + * @throws Exception if an appropriate source of randomness cannot be found. + */ + function random_int(int $min, int $max): int {} +} + +namespace Random\Engine { + use Random\CryptoSafeEngine; + use Random\Engine; + + /** + * @since 8.2 + */ + final class Mt19937 implements Engine + { + public function __construct(int|null $seed = null, int $mode = MT_RAND_MT19937) {} + + public function generate(): string {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + + public function __debugInfo(): array {} + } + + /** + * @since 8.2 + */ + final class PcgOneseq128XslRr64 implements Engine + { + public function __construct(string|int|null $seed = null) {} + + public function generate(): string {} + + public function jump(int $advance): void {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + + public function __debugInfo(): array {} + } + + /** + * @since 8.2 + */ + final class Xoshiro256StarStar implements Engine + { + public function __construct(string|int|null $seed = null) {} + + public function generate(): string {} + + public function jump(): void {} + + public function jumpLong(): void {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + + public function __debugInfo(): array {} + } + + /** + * @since 8.2 + */ + final class Secure implements CryptoSafeEngine + { + public function generate(): string {} + } +} + +namespace Random { + use Error; + use Exception; + + /** + * @since 8.2 + */ + interface Engine + { + public function generate(): string; + } + + /** + * @since 8.2 + */ + interface CryptoSafeEngine extends Engine {} + + /** + * @since 8.2 + */ + final class Randomizer + { + public readonly Engine $engine; + + public function __construct(?Engine $engine = null) {} + + public function nextInt(): int {} + + public function getInt(int $min, int $max): int {} + + public function getBytes(int $length): string {} + + public function shuffleArray(array $array): array {} + + public function shuffleBytes(string $bytes): string {} + + public function pickArrayKeys(array $array, int $num): array {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + } + + /** + * @since 8.2 + */ + class RandomError extends Error {} + + /** + * @since 8.2 + */ + class BrokenRandomEngineError extends RandomError {} + + /** + * @since 8.2 + */ + class RandomException extends Exception {} +} diff --git a/sockets/sockets.php b/sockets/sockets.php index f6da00787..8b67511ec 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -884,6 +884,150 @@ */ define('TCP_DEFER_ACCEPT', 9); +/** + * @since 8.2 + */ +define('SO_INCOMING_CPU', 49); + +/** + * @since 8.2 + */ +define('SO_MEMINFO', 55); + +/** + * @since 8.2 + */ +define('SO_BPF_EXTENSIONS', 48); + +/** + * @since 8.2 + */ +define('SKF_AD_OFF', -4096); + +/** + * @since 8.2 + */ +define('SKF_AD_PROTOCOL', 0); + +/** + * @since 8.2 + */ +define('SKF_AD_PKTTYPE', 4); + +/** + * @since 8.2 + */ +define('SKF_AD_IFINDEX', 8); + +/** + * @since 8.2 + */ +define('SKF_AD_NLATTR', 12); + +/** + * @since 8.2 + */ +define('SKF_AD_NLATTR_NEST', 16); + +/** + * @since 8.2 + */ +define('SKF_AD_MARK', 20); + +/** + * @since 8.2 + */ +define('SKF_AD_QUEUE', 24); + +/** + * @since 8.2 + */ +define('SKF_AD_HATYPE', 28); + +/** + * @since 8.2 + */ +define('SKF_AD_RXHASH', 32); + +/** + * @since 8.2 + */ +define('SKF_AD_CPU', 36); + +/** + * @since 8.2 + */ +define('SKF_AD_ALU_XOR_X', 40); + +/** + * @since 8.2 + */ +define('SKF_AD_VLAN_TAG', 44); + +/** + * @since 8.2 + */ +define('SKF_AD_VLAN_TAG_PRESENT', 48); + +/** + * @since 8.2 + */ +define('SKF_AD_PAY_OFFSET', 52); + +/** + * @since 8.2 + */ +define('SKF_AD_RANDOM', 56); + +/** + * @since 8.2 + */ +define('SKF_AD_VLAN_TPID', 60); + +/** + * @since 8.2 + */ +define('SKF_AD_MAX', 64); + +/** + * @since 8.2 + */ +define('TCP_CONGESTION', 13); + +/** + * @since 8.2 + */ +define('TCP_NOTSENT_LOWAT', 25); + +/** + * @since 8.2 + */ +define('TCP_KEEPIDLE', 4); + +/** + * @since 8.2 + */ +define('TCP_KEEPINTVL', 5); + +/** + * @since 8.2 + */ +define('TCP_KEEPCNT', 6); + +/** + * Socket_set_option for the socket_send* functions. + * It avoids copy b/w userland and kernel for both TCP and UDP protocols. + * @since 8.2 + */ +define('SO_ZEROCOPY', 60); + +/** + * Socket_set_option for the socket_send* functions. + * It avoids copy b/w userland and kernel for both TCP and UDP protocols. + * @since 8.2 + */ +define('MSG_ZEROCOPY', 67108864); + /** * (PHP 7 >= 7.2.0)* The array. *
- * @return bool true on success or false on failure. + * @return true true on success or false on failure. */ -function shuffle(array &$array): bool {} +function shuffle(array &$array): true {} /** * Apply a user function to every member of an array @@ -572,9 +572,9 @@ function shuffle(array &$array): bool {} * it will be passed as the third parameter to the callback * funcname. * - * @return bool true on success or false on failure. + * @return true true on success or false on failure. */ -function array_walk(object|array &$array, callable $callback, mixed $arg): bool {} +function array_walk(object|array &$array, callable $callback, mixed $arg): true {} /** * Apply a user function recursively to every member of an array @@ -600,9 +600,9 @@ function array_walk(object|array &$array, callable $callback, mixed $arg): bool * it will be passed as the third parameter to the callback * funcname. * - * @return bool true on success or false on failure. + * @return true true on success or false on failure. */ -function array_walk_recursive(object|array &$array, callable $callback, mixed $arg): bool {} +function array_walk_recursive(object|array &$array, callable $callback, mixed $arg): true {} /** * Counts all elements in an array, or something in an object. diff --git a/standard/standard_defines.php b/standard/standard_defines.php index 53cfbb9a9..5014f1bb0 100644 --- a/standard/standard_defines.php +++ b/standard/standard_defines.php @@ -1610,3 +1610,98 @@ * @link https://php.net/manual/en/network.constants.php */ define('LOG_PERROR', 32); + +/** + * @since 8.2 + */ +define('DECIMAL_POINT', 65536); + +/** + * @since 8.2 + */ +define('THOUSANDS_SEP', 65537); + +/** + * @since 8.2 + */ +define('GROUPING', 65538); + +/** + * @since 8.2 + */ +define('ERA_YEAR', 131117); + +/** + * @since 8.2 + */ +define('INT_CURR_SYMBOL', 262144); + +/** + * @since 8.2 + */ +define('CURRENCY_SYMBOL', 262145); + +/** + * @since 8.2 + */ +define('MON_DECIMAL_POINT', 262146); + +/** + * @since 8.2 + */ +define('MON_THOUSANDS_SEP', 262147); + +/** + * @since 8.2 + */ +define('MON_GROUPING', 262148); + +/** + * @since 8.2 + */ +define('POSITIVE_SIGN', 262149); + +/** + * @since 8.2 + */ +define('NEGATIVE_SIGN', 262150); + +/** + * @since 8.2 + */ +define('INT_FRAC_DIGITS', 262151); + +/** + * @since 8.2 + */ +define('FRAC_DIGITS', 262152); + +/** + * @since 8.2 + */ +define('P_CS_PRECEDES', 262153); + +/** + * @since 8.2 + */ +define('P_SEP_BY_SPACE', 262154); + +/** + * @since 8.2 + */ +define('N_CS_PRECEDES', 262155); + +/** + * @since 8.2 + */ +define('N_SEP_BY_SPACE', 262156); + +/** + * @since 8.2 + */ +define('P_SIGN_POSN', 262157); + +/** + * @since 8.2 + */ +define('N_SIGN_POSN', 262158); diff --git a/tests/Model/StubsContainer.php b/tests/Model/StubsContainer.php index aa93c096c..2e1b2ace2 100644 --- a/tests/Model/StubsContainer.php +++ b/tests/Model/StubsContainer.php @@ -126,7 +126,7 @@ public function getFunction($name, $sourceFilePath = null, $shouldSuitCurrentPhp if (!empty($functions)) { return array_pop($functions); } else { - throw new RuntimeException("Could not get function {$name} from reflection"); + throw new RuntimeException("Could not get function {$name} from stubs"); } } diff --git a/xml/xml.php b/xml/xml.php index 19a493ad2..dc222a8ae 100644 --- a/xml/xml.php +++ b/xml/xml.php @@ -115,9 +115,9 @@ function xml_parser_create_ns(?string $encoding, string $separator = ':'): XMLPa * @param object $object* The object where to use the XML parser. *
- * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_object(XMLParser $parser, object $object): bool {} +function xml_set_object(XMLParser $parser, object $object): true {} /** * Set up start and end element handlers @@ -144,9 +144,9 @@ function xml_set_object(XMLParser $parser, object $object): bool {} * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_element_handler(XMLParser $parser, $start_handler, $end_handler): bool {} +function xml_set_element_handler(XMLParser $parser, $start_handler, $end_handler): true {} /** * Set up character data handler @@ -168,9 +168,9 @@ function xml_set_element_handler(XMLParser $parser, $start_handler, $end_handler * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_character_data_handler(XMLParser $parser, $handler): bool {} +function xml_set_character_data_handler(XMLParser $parser, $handler): true {} /** * Set up processing instruction (PI) handler @@ -193,9 +193,9 @@ function xml_set_character_data_handler(XMLParser $parser, $handler): bool {} * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_processing_instruction_handler(XMLParser $parser, $handler): bool {} +function xml_set_processing_instruction_handler(XMLParser $parser, $handler): true {} /** * Set up default handler @@ -217,9 +217,9 @@ function xml_set_processing_instruction_handler(XMLParser $parser, $handler): bo * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_default_handler(XMLParser $parser, $handler): bool {} +function xml_set_default_handler(XMLParser $parser, $handler): true {} /** * Set up unparsed entity declaration handler @@ -246,9 +246,9 @@ function xml_set_default_handler(XMLParser $parser, $handler): bool {} * The first parameter, parser, is a * reference to the XML parser calling the * handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_unparsed_entity_decl_handler(XMLParser $parser, $handler): bool {} +function xml_set_unparsed_entity_decl_handler(XMLParser $parser, $handler): true {} /** * Set up notation declaration handler @@ -273,9 +273,9 @@ function xml_set_unparsed_entity_decl_handler(XMLParser $parser, $handler): bool * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_notation_decl_handler(XMLParser $parser, $handler): bool {} +function xml_set_notation_decl_handler(XMLParser $parser, $handler): true {} /** * Set up external entity reference handler @@ -304,9 +304,9 @@ function xml_set_notation_decl_handler(XMLParser $parser, $handler): bool {} * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_external_entity_ref_handler(XMLParser $parser, $handler): bool {} +function xml_set_external_entity_ref_handler(XMLParser $parser, $handler): true {} /** * Set up start namespace declaration handler @@ -333,9 +333,9 @@ function xml_set_external_entity_ref_handler(XMLParser $parser, $handler): bool * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_start_namespace_decl_handler(XMLParser $parser, $handler): bool {} +function xml_set_start_namespace_decl_handler(XMLParser $parser, $handler): true {} /** * Set up end namespace declaration handler @@ -361,9 +361,9 @@ function xml_set_start_namespace_decl_handler(XMLParser $parser, $handler): bool * parser * The first parameter, parser, is a * reference to the XML parser calling the handler. - * @return bool TRUE on success or FALSE on failure. + * @return true TRUE on success or FALSE on failure. */ -function xml_set_end_namespace_decl_handler(XMLParser $parser, $handler): bool {} +function xml_set_end_namespace_decl_handler(XMLParser $parser, $handler): true {} /** * Start parsing an XML document