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

This commit is contained in:
Ivan Fedorov 2022-11-10 19:55:45 +01:00 committed by Ivan Fedorov
parent e16c1713ce
commit 1eb87f3a68
86 changed files with 1645 additions and 918 deletions

View File

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
name: Run tests against php 8.0
name: Run tests against php 8.1
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.0'
PHP_VERSION: '8.1'
- name: Composer Install
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.0 test_runner composer update
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 test_runner composer update
env:
PHP_VERSION: '8.0'
PHP_VERSION: '8.1'
- name: Dump Reflection To File
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.0 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.1 php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
env:
PHP_VERSION: '8.0'
PHP_VERSION: '8.1'
- name: Run Tests
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.0 test_runner vendor/bin/phpunit --testsuite PHP_8.0
run: docker-compose -f docker-compose.yml run -e PHP_VERSION=8.1 test_runner vendor/bin/phpunit --testsuite PHP_8.1
env:
PHP_VERSION: '8.0'
PHP_VERSION: '8.1'
additional:
runs-on: ubuntu-latest
name: Run cs-fixer and stubs structure tests

View File

@ -335,7 +335,7 @@ function error_reporting(?int $error_level): int {}
* </p>
* @return bool true on success or false on failure.
*/
function define(string $constant_name, $value, #[Deprecated(since: "7.3")] bool $case_insensitive = false): bool {}
function define(string $constant_name, mixed $value, #[Deprecated(since: "7.3")] bool $case_insensitive = false): bool {}
/**
* Checks whether a given named constant exists
@ -475,6 +475,21 @@ function interface_exists(string $interface, bool $autoload = true): bool {}
#[Pure(true)]
function function_exists(string $function): bool {}
/**
* Checks if the enum has been defined
* @link https://php.net/manual/en/function.enum-exists.php
* @param string $enum <p>
* The enum name. The name is matched in a case-insensitive manner.
* </p>
* @param bool $autoload [optional] <p>
* Whether or not to call autoload by default.
* </p>
* @return bool true if <i>enum</i> is a defined enum,
* false otherwise.
* @since 8.1
*/
function enum_exists(string $enum, bool $autoload = true): bool {}
/**
* Creates an alias for a class
* @link https://php.net/manual/en/function.class-alias.php

View File

@ -295,6 +295,76 @@ interface Stringable
public function __toString(): string;
}
/**
* @since 8.1
*/
interface UnitEnum
{
/**
* @return static[]
*/
#[Pure]
public static function cases(): array;
}
/**
* @since 8.1
*/
interface BackedEnum extends UnitEnum
{
/**
* @param int|string $value
* @return static
*/
#[Pure]
public static function from(int|string $value): static;
/**
* @param int|string $value
* @return static|null
*/
#[Pure]
public static function tryFrom(int|string $value): ?static;
}
/**
* @since 8.1
* @internal
*
* Internal interface to ensure precise type inference
*/
interface IntBackedEnum extends BackedEnum
{
/**
* @param int $value
* @return static
*/
#[Pure]
public static function from(int $value): static;
/**
* @param int $value
* @return static|null
*/
#[Pure]
public static function tryFrom(int $value): ?static;
}
/**
* @since 8.1
* @internal
*
* Internal interface to ensure precise type inference
*/
interface StringBackedEnum extends BackedEnum
{
#[Pure]
public static function from(string $value): static;
#[Pure]
public static function tryFrom(string $value): ?static;
}
/**
* Created by typecasting to object.
* @link https://php.net/manual/en/reserved.classes.php
@ -315,10 +385,10 @@ class Exception implements Throwable
protected $code;
/** The filename where the error happened */
protected $file;
protected string $file;
/** The line where the error happened */
protected $line;
protected int $line;
/**
* Construct the exception. Note: The message is NOT binary safe.
@ -407,7 +477,7 @@ class Exception implements Throwable
* @link https://php.net/manual/en/exception.clone.php
* @return void
*/
final private function __clone(): void {}
private function __clone(): void {}
}
/**
@ -424,10 +494,10 @@ class Error implements Throwable
protected $code;
/** The filename where the error happened */
protected $file;
protected string $file;
/** The line where the error happened */
protected $line;
protected int $line;
/**
* Construct the error object.
@ -514,7 +584,7 @@ class Error implements Throwable
* @return void
* @link https://php.net/manual/en/error.clone.php
*/
final private function __clone(): void {}
private function __clone(): void {}
}
class ValueError extends Error {}
@ -579,7 +649,7 @@ class UnhandledMatchError extends Error {}
*/
class ErrorException extends Exception
{
protected $severity;
protected int $severity;
/**
* Constructs the exception
@ -842,3 +912,119 @@ final class InternalIterator implements Iterator
public function rewind(): void {}
}
/**
* @since 8.1
*
* @template TStart
* @template TResume
* @template TReturn
* @template TSuspend
*/
final class Fiber
{
/**
* @param callable $callback Function to invoke when starting the fiber.
*/
public function __construct(callable $callback) {}
/**
* @return self|null Returns the currently executing fiber instance or NULL if in {main}.
*/
public static function getCurrent(): ?Fiber {}
/**
* Suspend execution of the fiber. The fiber may be resumed with {@see Fiber::resume()} or {@see Fiber::throw()}.
*
* Cannot be called from {main}.
*
* @param TSuspend $value Value to return from {@see Fiber::resume()} or {@see Fiber::throw()}.
*
* @return TResume Value provided to {@see Fiber::resume()}.
*
* @throws FiberError Thrown if not within a fiber (i.e., if called from {main}).
* @throws Throwable Exception provided to {@see Fiber::throw()}.
*/
public static function suspend(mixed $value = null): mixed {}
/**
* Starts execution of the fiber. Returns when the fiber suspends or terminates.
*
* @param TStart ...$args Arguments passed to fiber function.
*
* @return TSuspend|null Value from the first suspension point or NULL if the fiber returns.
*
* @throws FiberError If the fiber has already been started.
* @throws Throwable If the fiber callable throws an uncaught exception.
*/
public function start(mixed ...$args): mixed {}
/**
* Resumes the fiber, returning the given value from {@see Fiber::suspend()}.
* Returns when the fiber suspends or terminates.
*
* @param TResume $value
*
* @return TSuspend|null Value from the next suspension point or NULL if the fiber returns.
*
* @throws FiberError If the fiber has not started, is running, or has terminated.
* @throws Throwable If the fiber callable throws an uncaught exception.
*/
public function resume(mixed $value = null): mixed {}
/**
* Throws the given exception into the fiber from {@see Fiber::suspend()}.
* Returns when the fiber suspends or terminates.
*
* @param Throwable $exception
*
* @return TSuspend|null Value from the next suspension point or NULL if the fiber returns.
*
* @throws FiberError If the fiber has not started, is running, or has terminated.
* @throws Throwable If the fiber callable throws an uncaught exception.
*/
public function throw(Throwable $exception): mixed {}
/**
* @return bool True if the fiber has been started.
*/
public function isStarted(): bool {}
/**
* @return bool True if the fiber is suspended.
*/
public function isSuspended(): bool {}
/**
* @return bool True if the fiber is currently running.
*/
public function isRunning(): bool {}
/**
* @return bool True if the fiber has completed execution (returned or threw).
*/
public function isTerminated(): bool {}
/**
* @return TReturn Return value of the fiber callback. NULL is returned if the fiber does not have a return statement.
*
* @throws FiberError If the fiber has not terminated or the fiber threw an exception.
*/
public function getReturn(): mixed {}
}
/**
* @since 8.1
*/
final class FiberError extends Error
{
public function __construct() {}
}
/**
* @since 8.1
*/
final class ReturnTypeWillChange
{
public function __construct() {}
}

View File

@ -23,7 +23,7 @@ function pdo_drivers(): array {}
*/
class PDOException extends RuntimeException
{
public $errorInfo;
public array|null $errorInfo;
protected $code;
}
@ -762,6 +762,11 @@ class PDO
*/
public const MYSQL_ATTR_SSL_VERIFY_SERVER_CERT = 1014;
/**
* @since 8.1
*/
public const MYSQL_ATTR_LOCAL_INFILE_DIRECTORY = 1015;
#[Deprecated("Use PDO::ATTR_EMULATE_PREPARES instead")]
public const PGSQL_ASSOC = 1;
@ -924,9 +929,9 @@ class PDO
* Creates a PDO instance representing a connection to a database
* @link https://php.net/manual/en/pdo.construct.php
* @param string $dsn
* @param string|null $username [optional]
* @param string|null $password [optional]
* @param array|null $options [optional]
* @param string $username [optional]
* @param string $password [optional]
* @param array $options [optional]
* @throws PDOException if the attempt to connect to the requested database fails.
*/
public function __construct(string $dsn, string|null $username = null, string|null $password = null, array|null $options = null) {}
@ -1420,7 +1425,7 @@ class PDOStatement implements IteratorAggregate
/**
* @var string
*/
public $queryString;
public string $queryString;
/**
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
@ -1845,5 +1850,5 @@ class PDOStatement implements IteratorAggregate
final class PDORow
{
public $queryString;
public string $queryString;
}

View File

@ -21,9 +21,11 @@ const CLASSES = array (
'ArrayObject' => 'SPL/SPL.php',
'AssertionError' => 'standard/standard_9.php',
'Attribute' => 'Core/Core_c.php',
'BackedEnum' => 'Core/Core_c.php',
'BadFunctionCallException' => 'SPL/SPL.php',
'BadMethodCallException' => 'SPL/SPL.php',
'CURLFile' => 'curl/curl.php',
'CURLStringFile' => 'curl/CURLStringFile.php',
'CachingIterator' => 'SPL/SPL.php',
'CallbackFilterIterator' => 'SPL/SPL.php',
'ClosedGeneratorException' => 'standard/_types.php',
@ -84,13 +86,18 @@ const CLASSES = array (
'Error' => 'Core/Core_c.php',
'ErrorException' => 'Core/Core_c.php',
'Exception' => 'Core/Core_c.php',
'FTP\\Connection' => 'ftp/Connection.php',
'Fiber' => 'Core/Core_c.php',
'FiberError' => 'Core/Core_c.php',
'FilesystemIterator' => 'SPL/SPL_c1.php',
'FilterIterator' => 'SPL/SPL.php',
'GMP' => 'gmp/gmp.php',
'GdFont' => 'gd/GdFont.php',
'GdImage' => 'gd/gd.php',
'Generator' => 'standard/_types.php',
'GlobIterator' => 'SPL/SPL_c1.php',
'HashContext' => 'hash/hash.php',
'IMAP\\Connection' => 'imap/Connection.php',
'InfiniteIterator' => 'SPL/SPL.php',
'InflateContext' => 'zlib/zlib.php',
'InternalIterator' => 'Core/Core_c.php',
@ -99,6 +106,7 @@ const CLASSES = array (
'IntlChar' => 'intl/IntlChar.php',
'IntlCodePointBreakIterator' => 'intl/intl.php',
'IntlDateFormatter' => 'intl/intl.php',
'IntlDatePatternGenerator' => 'intl/IntlDatePatternGenerator.php',
'IntlException' => 'intl/intl.php',
'IntlGregorianCalendar' => 'intl/intl.php',
'IntlIterator' => 'intl/intl.php',
@ -112,6 +120,9 @@ const CLASSES = array (
'JsonException' => 'json/json.php',
'JsonIncrementalParser' => 'json/json.php',
'JsonSerializable' => 'json/json.php',
'LDAP\\Connection' => 'ldap/Connection.php',
'LDAP\\Result' => 'ldap/Result.php',
'LDAP\\ResultEntry' => 'ldap/ResultEntry.php',
'LengthException' => 'SPL/SPL.php',
'LibXMLError' => 'libxml/libxml.php',
'LimitIterator' => 'SPL/SPL.php',
@ -135,8 +146,13 @@ const CLASSES = array (
'PDOException' => 'PDO/PDO.php',
'PDORow' => 'PDO/PDO.php',
'PDOStatement' => 'PDO/PDO.php',
'PSpell\\Config' => 'pspell/pspell_c.php',
'PSpell\\Dictionary' => 'pspell/pspell_c.php',
'ParentIterator' => 'SPL/SPL.php',
'ParseError' => 'Core/Core_c.php',
'PgSql\\Connection' => 'pgsql/pgsql_c.php',
'PgSql\\Lob' => 'pgsql/pgsql_c.php',
'PgSql\\Result' => 'pgsql/pgsql_c.php',
'Phar' => 'Phar/Phar.php',
'PharData' => 'Phar/Phar.php',
'PharException' => 'Phar/Phar.php',
@ -156,11 +172,17 @@ const CLASSES = array (
'ReflectionAttribute' => 'Reflection/ReflectionAttribute.php',
'ReflectionClass' => 'Reflection/ReflectionClass.php',
'ReflectionClassConstant' => 'Reflection/ReflectionClassConstant.php',
'ReflectionEnum' => 'Reflection/ReflectionEnum.php',
'ReflectionEnumBackedCase' => 'Reflection/ReflectionEnumBackedCase.php',
'ReflectionEnumPureCase' => 'Reflection/ReflectionEnumPureCase.php',
'ReflectionEnumUnitCase' => 'Reflection/ReflectionEnumUnitCase.php',
'ReflectionException' => 'Reflection/ReflectionException.php',
'ReflectionExtension' => 'Reflection/ReflectionExtension.php',
'ReflectionFiber' => 'Reflection/ReflectionFiber.php',
'ReflectionFunction' => 'Reflection/ReflectionFunction.php',
'ReflectionFunctionAbstract' => 'Reflection/ReflectionFunctionAbstract.php',
'ReflectionGenerator' => 'Reflection/ReflectionGenerator.php',
'ReflectionIntersectionType' => 'Reflection/ReflectionIntersectionType.php',
'ReflectionMethod' => 'Reflection/ReflectionMethod.php',
'ReflectionNamedType' => 'Reflection/ReflectionNamedType.php',
'ReflectionObject' => 'Reflection/ReflectionObject.php',
@ -173,6 +195,7 @@ const CLASSES = array (
'Reflector' => 'Reflection/Reflector.php',
'RegexIterator' => 'SPL/SPL.php',
'ResourceBundle' => 'intl/intl.php',
'ReturnTypeWillChange' => 'Core/Core_c.php',
'RuntimeException' => 'SPL/SPL.php',
'SNMP' => 'snmp/snmp.php',
'SNMPException' => 'snmp/snmp.php',
@ -223,6 +246,7 @@ const CLASSES = array (
'UnderflowException' => 'SPL/SPL.php',
'UnexpectedValueException' => 'SPL/SPL.php',
'UnhandledMatchError' => 'Core/Core_c.php',
'UnitEnum' => 'Core/Core_c.php',
'ValueError' => 'Core/Core_c.php',
'WeakMap' => 'Core/Core_c.php',
'WeakReference' => 'Core/Core_c.php',
@ -294,6 +318,7 @@ const FUNCTIONS = array (
'array_intersect_key' => 'standard/standard_9.php',
'array_intersect_uassoc' => 'standard/standard_9.php',
'array_intersect_ukey' => 'standard/standard_9.php',
'array_is_list' => 'standard/standard_9.php',
'array_key_exists' => 'standard/standard_9.php',
'array_key_first' => 'standard/standard_9.php',
'array_key_last' => 'standard/standard_9.php',
@ -585,6 +610,7 @@ const FUNCTIONS = array (
'enchant_dict_store_replacement' => 'enchant/enchant.php',
'enchant_dict_suggest' => 'enchant/enchant.php',
'end' => 'standard/standard_8.php',
'enum_exists' => 'Core/Core.php',
'ereg' => 'regex/ereg.php',
'ereg_replace' => 'regex/ereg.php',
'eregi' => 'regex/ereg.php',
@ -656,6 +682,7 @@ const FUNCTIONS = array (
'fbird_trans' => 'interbase/interbase.php',
'fbird_wait_event' => 'interbase/interbase.php',
'fclose' => 'standard/standard_5.php',
'fdatasync' => 'standard/standard_5.php',
'fdiv' => 'standard/standard_3.php',
'feof' => 'standard/standard_5.php',
'fflush' => 'standard/standard_5.php',
@ -708,6 +735,7 @@ const FUNCTIONS = array (
'fseek' => 'standard/standard_5.php',
'fsockopen' => 'standard/standard_7.php',
'fstat' => 'standard/standard_5.php',
'fsync' => 'standard/standard_5.php',
'ftell' => 'standard/standard_5.php',
'ftok' => 'standard/standard_9.php',
'ftp_alloc' => 'ftp/ftp.php',
@ -1006,6 +1034,7 @@ const FUNCTIONS = array (
'imagealphablending' => 'gd/gd.php',
'imageantialias' => 'gd/gd.php',
'imagearc' => 'gd/gd.php',
'imageavif' => 'gd/gd.php',
'imagebmp' => 'gd/gd.php',
'imagechar' => 'gd/gd.php',
'imagecharup' => 'gd/gd.php',
@ -1032,6 +1061,7 @@ const FUNCTIONS = array (
'imagecopyresampled' => 'gd/gd.php',
'imagecopyresized' => 'gd/gd.php',
'imagecreate' => 'gd/gd.php',
'imagecreatefromavif' => 'gd/gd.php',
'imagecreatefrombmp' => 'gd/gd.php',
'imagecreatefromgd' => 'gd/gd.php',
'imagecreatefromgd2' => 'gd/gd.php',
@ -1349,8 +1379,6 @@ const FUNCTIONS = array (
'ldap_close' => 'ldap/ldap.php',
'ldap_compare' => 'ldap/ldap.php',
'ldap_connect' => 'ldap/ldap.php',
'ldap_control_paged_result' => 'ldap/ldap.php',
'ldap_control_paged_result_response' => 'ldap/ldap.php',
'ldap_count_entries' => 'ldap/ldap.php',
'ldap_count_references' => 'ldap/ldap.php',
'ldap_delete' => 'ldap/ldap.php',
@ -1397,7 +1425,6 @@ const FUNCTIONS = array (
'ldap_search' => 'ldap/ldap.php',
'ldap_set_option' => 'ldap/ldap.php',
'ldap_set_rebind_proc' => 'ldap/ldap.php',
'ldap_sort' => 'ldap/ldap.php',
'ldap_start_tls' => 'ldap/ldap.php',
'ldap_t61_to_8859' => 'ldap/ldap.php',
'ldap_unbind' => 'ldap/ldap.php',
@ -1704,6 +1731,7 @@ const FUNCTIONS = array (
'mysqli_fetch_all' => 'mysqli/mysqli.php',
'mysqli_fetch_array' => 'mysqli/mysqli.php',
'mysqli_fetch_assoc' => 'mysqli/mysqli.php',
'mysqli_fetch_column' => 'mysqli/mysqli.php',
'mysqli_fetch_field' => 'mysqli/mysqli.php',
'mysqli_fetch_field_direct' => 'mysqli/mysqli.php',
'mysqli_fetch_fields' => 'mysqli/mysqli.php',
@ -2531,6 +2559,19 @@ const FUNCTIONS = array (
'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_core_ristretto255_add' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_from_hash' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_is_valid_point' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_random' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_add' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_complement' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_invert' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_mul' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_negate' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_random' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_reduce' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_scalar_sub' => 'sodium/sodium.php',
'sodium_crypto_core_ristretto255_sub' => 'sodium/sodium.php',
'sodium_crypto_generichash' => 'sodium/sodium.php',
'sodium_crypto_generichash_final' => 'sodium/sodium.php',
'sodium_crypto_generichash_init' => 'sodium/sodium.php',
@ -2554,6 +2595,8 @@ const FUNCTIONS = array (
'sodium_crypto_pwhash_str_verify' => 'sodium/sodium.php',
'sodium_crypto_scalarmult' => 'sodium/sodium.php',
'sodium_crypto_scalarmult_base' => 'sodium/sodium.php',
'sodium_crypto_scalarmult_ristretto255' => 'sodium/sodium.php',
'sodium_crypto_scalarmult_ristretto255_base' => 'sodium/sodium.php',
'sodium_crypto_secretbox' => 'sodium/sodium.php',
'sodium_crypto_secretbox_keygen' => 'sodium/sodium.php',
'sodium_crypto_secretbox_open' => 'sodium/sodium.php',
@ -2579,6 +2622,9 @@ const FUNCTIONS = array (
'sodium_crypto_sign_verify_detached' => 'sodium/sodium.php',
'sodium_crypto_stream' => 'sodium/sodium.php',
'sodium_crypto_stream_keygen' => 'sodium/sodium.php',
'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_xor' => 'sodium/sodium.php',
'sodium_hex2bin' => 'sodium/sodium.php',
'sodium_increment' => 'sodium/sodium.php',
@ -3242,6 +3288,7 @@ const CONSTANTS = array (
'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_URL' => 'curl/curl_d.php',
'CURLOPT_EGDSOCKET' => 'curl/curl_d.php',
'CURLOPT_ENCODING' => 'curl/curl_d.php',
'CURLOPT_EXPECT_100_TIMEOUT_MS' => 'curl/curl_d.php',
@ -3289,6 +3336,7 @@ const CONSTANTS = array (
'CURLOPT_INTERFACE' => 'curl/curl_d.php',
'CURLOPT_IPRESOLVE' => 'curl/curl_d.php',
'CURLOPT_ISSUERCERT' => 'curl/curl_d.php',
'CURLOPT_ISSUERCERT_BLOB' => 'curl/curl_d.php',
'CURLOPT_KEEP_SENDING_ON_ERROR' => 'curl/curl_d.php',
'CURLOPT_KEYPASSWD' => 'curl/curl_d.php',
'CURLOPT_KRB4LEVEL' => 'curl/curl_d.php',
@ -3341,13 +3389,17 @@ const CONSTANTS = array (
'CURLOPT_PROXY_CAINFO' => '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',
'CURLOPT_PROXY_ISSUERCERT_BLOB' => 'curl/curl_d.php',
'CURLOPT_PROXY_KEYPASSWD' => 'curl/curl_d.php',
'CURLOPT_PROXY_PINNEDPUBLICKEY' => 'curl/curl_d.php',
'CURLOPT_PROXY_SERVICE_NAME' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSLCERT' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSLCERTTYPE' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSLCERT_BLOB' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSLKEY' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSLKEYTYPE' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSLKEY_BLOB' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSLVERSION' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSL_CIPHER_LIST' => 'curl/curl_d.php',
'CURLOPT_PROXY_SSL_OPTIONS' => 'curl/curl_d.php',
@ -3392,11 +3444,13 @@ const CONSTANTS = array (
'CURLOPT_SSLCERT' => 'curl/curl_d.php',
'CURLOPT_SSLCERTPASSWD' => 'curl/curl_d.php',
'CURLOPT_SSLCERTTYPE' => 'curl/curl_d.php',
'CURLOPT_SSLCERT_BLOB' => 'curl/curl_d.php',
'CURLOPT_SSLENGINE' => 'curl/curl_d.php',
'CURLOPT_SSLENGINE_DEFAULT' => 'curl/curl_d.php',
'CURLOPT_SSLKEY' => 'curl/curl_d.php',
'CURLOPT_SSLKEYPASSWD' => 'curl/curl_d.php',
'CURLOPT_SSLKEYTYPE' => 'curl/curl_d.php',
'CURLOPT_SSLKEY_BLOB' => 'curl/curl_d.php',
'CURLOPT_SSLVERSION' => 'curl/curl_d.php',
'CURLOPT_SSL_CIPHER_LIST' => 'curl/curl_d.php',
'CURLOPT_SSL_ENABLE_ALPN' => 'curl/curl_d.php',
@ -3923,6 +3977,7 @@ const CONSTANTS = array (
'ILL_ILLTRP' => 'pcntl/pcntl.php',
'ILL_PRVOPC' => 'pcntl/pcntl.php',
'ILL_PRVREG' => 'pcntl/pcntl.php',
'IMAGETYPE_AVIF' => 'standard/standard_defines.php',
'IMAGETYPE_BMP' => 'standard/standard_defines.php',
'IMAGETYPE_COUNT' => 'standard/standard_defines.php',
'IMAGETYPE_GIF' => 'standard/standard_defines.php',
@ -3961,6 +4016,7 @@ const CONSTANTS = array (
'IMG_ARC_NOFILL' => 'gd/gd.php',
'IMG_ARC_PIE' => 'gd/gd.php',
'IMG_ARC_ROUNDED' => 'gd/gd.php',
'IMG_AVIF' => 'gd/gd.php',
'IMG_BELL' => 'gd/gd.php',
'IMG_BESSEL' => 'gd/gd.php',
'IMG_BICUBIC' => 'gd/gd.php',
@ -4023,6 +4079,7 @@ const CONSTANTS = array (
'IMG_TRIANGLE' => 'gd/gd.php',
'IMG_WBMP' => 'gd/gd.php',
'IMG_WEBP' => 'gd/gd.php',
'IMG_WEBP_LOSSLESS' => 'gd/gd.php',
'IMG_WEIGHTED4' => 'gd/gd.php',
'IMG_XPM' => 'gd/gd.php',
'INF' => 'standard/standard_defines.php',
@ -4075,6 +4132,7 @@ const CONSTANTS = array (
'JSON_ERROR_INF_OR_NAN' => 'json/json.php',
'JSON_ERROR_INVALID_PROPERTY_NAME' => 'json/json.php',
'JSON_ERROR_NONE' => 'json/json.php',
'JSON_ERROR_NON_BACKED_ENUM' => 'json/json.php',
'JSON_ERROR_RECURSION' => 'json/json.php',
'JSON_ERROR_STATE_MISMATCH' => 'json/json.php',
'JSON_ERROR_SYNTAX' => 'json/json.php',
@ -4359,6 +4417,9 @@ const CONSTANTS = array (
'MHASH_MD2' => 'hash/hash.php',
'MHASH_MD4' => 'hash/hash.php',
'MHASH_MD5' => 'hash/hash.php',
'MHASH_MURMUR3A' => 'hash/hash.php',
'MHASH_MURMUR3C' => 'hash/hash.php',
'MHASH_MURMUR3F' => 'hash/hash.php',
'MHASH_RIPEMD128' => 'hash/hash.php',
'MHASH_RIPEMD160' => 'hash/hash.php',
'MHASH_RIPEMD256' => 'hash/hash.php',
@ -4373,6 +4434,10 @@ const CONSTANTS = array (
'MHASH_TIGER128' => 'hash/hash.php',
'MHASH_TIGER160' => 'hash/hash.php',
'MHASH_WHIRLPOOL' => 'hash/hash.php',
'MHASH_XXH128' => 'hash/hash.php',
'MHASH_XXH3' => 'hash/hash.php',
'MHASH_XXH32' => 'hash/hash.php',
'MHASH_XXH64' => 'hash/hash.php',
'MON_1' => 'standard/standard_defines.php',
'MON_10' => 'standard/standard_defines.php',
'MON_11' => 'standard/standard_defines.php',
@ -4434,6 +4499,7 @@ const CONSTANTS = array (
'MYSQLI_ENUM_FLAG' => 'mysqli/mysqli.php',
'MYSQLI_GROUP_FLAG' => 'mysqli/mysqli.php',
'MYSQLI_INIT_COMMAND' => 'mysqli/mysqli.php',
'MYSQLI_IS_MARIADB' => 'mysqli/mysqli.php',
'MYSQLI_MULTIPLE_KEY_FLAG' => 'mysqli/mysqli.php',
'MYSQLI_NOT_NULL_FLAG' => 'mysqli/mysqli.php',
'MYSQLI_NO_DATA' => 'mysqli/mysqli.php',
@ -5275,6 +5341,7 @@ const CONSTANTS = array (
'SO_FREE' => 'imap/imap.php',
'SO_KEEPALIVE' => 'sockets/sockets.php',
'SO_LINGER' => 'sockets/sockets.php',
'SO_MARK' => 'sockets/sockets.php',
'SO_NOSERVER' => 'imap/imap.php',
'SO_OOBINLINE' => 'sockets/sockets.php',
'SO_PASSCRED' => 'sockets/sockets.php',
@ -5497,6 +5564,7 @@ const CONSTANTS = array (
'S_SESSION' => 'Core/Core_d.php',
'S_SQL' => 'Core/Core_d.php',
'S_VARS' => 'Core/Core_d.php',
'TCP_DEFER_ACCEPT' => 'sockets/sockets.php',
'TCP_NODELAY' => 'sockets/sockets.php',
'THOUSEP' => 'standard/standard_defines.php',
'TIDY_NODETYPE_ASP' => 'tidy/tidy.php',
@ -5673,6 +5741,8 @@ const CONSTANTS = array (
'TYPETEXT' => 'imap/imap.php',
'TYPEVIDEO' => 'imap/imap.php',
'T_ABSTRACT' => 'tokenizer/tokenizer.php',
'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG' => 'tokenizer/tokenizer.php',
'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG' => 'tokenizer/tokenizer.php',
'T_AND_EQUAL' => 'tokenizer/tokenizer.php',
'T_ARRAY' => 'tokenizer/tokenizer.php',
'T_ARRAY_CAST' => 'tokenizer/tokenizer.php',
@ -5724,6 +5794,7 @@ const CONSTANTS = array (
'T_ENDSWITCH' => 'tokenizer/tokenizer.php',
'T_ENDWHILE' => 'tokenizer/tokenizer.php',
'T_END_HEREDOC' => 'tokenizer/tokenizer.php',
'T_ENUM' => 'tokenizer/tokenizer.php',
'T_EVAL' => 'tokenizer/tokenizer.php',
'T_EXIT' => 'tokenizer/tokenizer.php',
'T_EXTENDS' => 'tokenizer/tokenizer.php',
@ -5790,6 +5861,7 @@ const CONSTANTS = array (
'T_PRIVATE' => 'tokenizer/tokenizer.php',
'T_PROTECTED' => 'tokenizer/tokenizer.php',
'T_PUBLIC' => 'tokenizer/tokenizer.php',
'T_READONLY' => 'tokenizer/tokenizer.php',
'T_REQUIRE' => 'tokenizer/tokenizer.php',
'T_REQUIRE_ONCE' => 'tokenizer/tokenizer.php',
'T_RETURN' => 'tokenizer/tokenizer.php',

View File

@ -38,7 +38,7 @@ class ReflectionClass implements Reflector
* @var class-string<T> Name of the class, same as calling the {@see ReflectionClass::getName()} method
*/
#[Immutable]
public $name;
public string $name;
/**
* Constructs a ReflectionClass
@ -646,12 +646,13 @@ class ReflectionClass implements Reflector
#[Pure]
public function getAttributes(?string $name = null, int $flags = 0): array {}
public function isEnum(): bool {}
/**
* Clones object
*
* @link https://php.net/manual/en/reflectionclass.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -34,17 +34,22 @@ class ReflectionClassConstant implements Reflector
*/
public const IS_PRIVATE = 4;
/**
* @since 8.1
*/
public const IS_FINAL = 5;
/**
* @var string Constant name, same as calling the {@see ReflectionClassConstant::getName()} method
*/
#[Immutable]
public $name;
public string $name;
/**
* @var string Fully qualified class name where this constant was defined
*/
#[Immutable]
public $class;
public string $class;
/**
* @var bool
@ -187,10 +192,18 @@ class ReflectionClassConstant implements Reflector
#[Pure]
public function getAttributes(?string $name = null, int $flags = 0): array {}
public function isEnumCase(): bool {}
/**
* @return bool
* @since 8.1
*/
public function isFinal(): bool {}
/**
* ReflectionClassConstant cannot be cloned
*
* @return void
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -0,0 +1,36 @@
<?php
/**
* @link https://php.net/manual/en/class.reflectionenum.php
* @since 8.1
*/
class ReflectionEnum extends ReflectionClass
{
public function __construct(object|string $objectOrClass) {}
/**
* @param string $name
* @return bool
*/
public function hasCase(string $name): bool {}
/**
* @return ReflectionEnumPureCase[]|ReflectionEnumBackedCase[]
*/
public function getCases(): array {}
/**
* @return ReflectionEnumPureCase|ReflectionEnumBackedCase
* @throws ReflectionException If no found single reflection object for the corresponding case
*/
public function getCase(string $name): ReflectionEnumUnitCase {}
/**
* @return bool
*/
public function isBacked(): bool {}
/**
* @return ReflectionType|null
*/
public function getBackingType(): null|ReflectionType {}
}

View File

@ -0,0 +1,11 @@
<?php
/**
* @link https://php.net/manual/en/class.reflectionenumbackedcase.php
* @since 8.1
*/
class ReflectionEnumBackedCase extends ReflectionEnumUnitCase
{
public function __construct(object|string $class, string $constant) {}
public function getBackingValue(): int|string {}
}

View File

@ -0,0 +1,6 @@
<?php
/**
* @link https://php.net/manual/en/class.reflectionenumpurecase.php
* @since 8.1
*/
class ReflectionEnumPureCase extends ReflectionClassConstant {}

View File

@ -0,0 +1,16 @@
<?php
/**
* @link https://php.net/manual/en/class.reflectionenumunitcase.php
* @since 8.1
*/
class ReflectionEnumUnitCase extends ReflectionClassConstant
{
public function __construct(object|string $class, string $constant) {}
public function getValue(): UnitEnum {}
/**
* @return ReflectionEnum
*/
public function getEnum(): ReflectionEnum {}
}

View File

@ -16,7 +16,7 @@ class ReflectionExtension implements Reflector
* @var string Name of the extension, same as calling the {@see ReflectionExtension::getName()} method
*/
#[Immutable]
public $name;
public string $name;
/**
* Constructs a ReflectionExtension
@ -177,5 +177,5 @@ class ReflectionExtension implements Reflector
* @link https://php.net/manual/en/reflectionextension.clone.php
* @return void No value is returned, if called a fatal error will occur.
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -0,0 +1,18 @@
<?php
/**
* @since 8.1
*/
final class ReflectionFiber
{
public function __construct(Fiber $fiber) {}
public function getFiber(): Fiber {}
public function getExecutingFile(): string {}
public function getExecutingLine(): int {}
public function getCallable(): callable {}
public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {}
}

View File

@ -16,7 +16,7 @@ abstract class ReflectionFunctionAbstract implements Reflector
* @var string Name of the function, same as calling the {@see ReflectionFunctionAbstract::getName()} method
*/
#[Immutable]
public $name;
public string $name;
/**
* Checks if function in namespace
@ -234,7 +234,7 @@ abstract class ReflectionFunctionAbstract implements Reflector
*/
#[Pure]
#[TentativeType]
public function getReturnType(): ReflectionNamedType|ReflectionUnionType|null {}
public function getReturnType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null {}
/**
* Gets function short name
@ -299,12 +299,24 @@ abstract class ReflectionFunctionAbstract implements Reflector
#[Pure]
public function getAttributes(?string $name = null, int $flags = 0): array {}
#[Pure]
public function getClosureUsedVariables(): array {}
#[Pure]
public function hasTentativeReturnType(): bool {}
#[Pure]
public function getTentativeReturnType(): ?ReflectionType {}
#[Pure]
#[TentativeType]
public function isStatic(): bool {}
/**
* Clones function
*
* @link https://php.net/manual/en/reflectionfunctionabstract.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -0,0 +1,13 @@
<?php
use JetBrains\PhpStorm\Pure;
/**
* @since 8.1
*/
class ReflectionIntersectionType extends ReflectionType
{
/** @return ReflectionType[] */
#[Pure]
public function getTypes(): array {}
}

View File

@ -53,7 +53,7 @@ class ReflectionMethod extends ReflectionFunctionAbstract
* @var string Fully qualified class name where this method was defined
*/
#[Immutable]
public $class;
public string $class;
/**
* Constructs a ReflectionMethod
@ -267,12 +267,13 @@ class ReflectionMethod extends ReflectionFunctionAbstract
/**
* Set method accessibility
* This method is no-op starting from PHP 8.1
*
* @link https://php.net/manual/en/reflectionmethod.setaccessible.php
* @param bool $accessible {@see true} to allow accessibility, or {@see false}
* @return void No value is returned.
* @since 5.3.2
*/
#[Pure]
#[TentativeType]
public function setAccessible(bool $accessible): void {}
}

View File

@ -17,7 +17,7 @@ class ReflectionParameter implements Reflector
* @var string Name of the parameter, same as calling the {@see ReflectionParameter::getName()} method
*/
#[Immutable]
public $name;
public string $name;
/**
* Construct
@ -139,7 +139,7 @@ class ReflectionParameter implements Reflector
*/
#[Pure]
#[TentativeType]
public function getType(): ReflectionNamedType|ReflectionUnionType|null {}
public function getType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null {}
/**
* Checks if parameter expects an array
@ -284,5 +284,5 @@ class ReflectionParameter implements Reflector
* @link https://php.net/manual/en/reflectionparameter.clone.php
* @return void
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -41,17 +41,22 @@ class ReflectionProperty implements Reflector
*/
public const IS_PRIVATE = 4;
/**
* @since 8.1
*/
public const IS_READONLY = 5;
/**
* @var string Name of the property, same as calling the {@see ReflectionProperty::getName()} method
*/
#[Immutable]
public $name;
public string $name;
/**
* @var string Fully qualified class name where this property was defined
*/
#[Immutable]
public $class;
public string $class;
/**
* Construct a ReflectionProperty object
@ -207,11 +212,13 @@ class ReflectionProperty implements Reflector
/**
* Set property accessibility
* This method is no-op starting from PHP 8.1
*
* @link https://php.net/manual/en/reflectionproperty.setaccessible.php
* @param bool $accessible A boolean {@see true} to allow accessibility, or {@see false}
* @return void No value is returned.
*/
#[Pure]
#[TentativeType]
public function setAccessible(bool $accessible): void {}
@ -225,7 +232,7 @@ class ReflectionProperty implements Reflector
*/
#[Pure]
#[TentativeType]
public function getType(): ReflectionNamedType|ReflectionUnionType|null {}
public function getType(): ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null {}
/**
* Checks if property has type
@ -286,12 +293,17 @@ class ReflectionProperty implements Reflector
#[Pure]
public function getAttributes(?string $name = null, int $flags = 0): array {}
/**
* @return bool
* @since 8.1
*/
public function isReadOnly(): bool {}
/**
* Clone
*
* @link https://php.net/manual/en/reflectionproperty.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -50,5 +50,5 @@ abstract class ReflectionType implements Stringable
*
* @return void
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -14,7 +14,7 @@ class ReflectionZendExtension implements Reflector
* @var string Name of the extension, same as calling the {@see ReflectionZendExtension::getName()} method
*/
#[Immutable]
public $name;
public string $name;
/**
* Constructs a ReflectionZendExtension object
@ -111,5 +111,5 @@ class ReflectionZendExtension implements Reflector
* @return void
* @since 5.4
*/
final private function __clone(): void {}
private function __clone(): void {}
}

View File

@ -161,7 +161,7 @@ class EmptyIterator implements Iterator
* @return mixed Can return any type.
*/
#[TentativeType]
public function current() {}
public function current(): never {}
/**
* Move forward to next element
@ -177,7 +177,7 @@ class EmptyIterator implements Iterator
* @return mixed The key of the current element.
*/
#[TentativeType]
public function key() {}
public function key(): never {}
/**
* Checks if current position is valid
@ -1146,7 +1146,7 @@ class RegexIterator extends FilterIterator
*/
public const USE_KEY = 1;
public const INVERT_MATCH = 2;
public $replacement;
public string|null $replacement;
/**
* Create a new RegexIterator

View File

@ -737,7 +737,7 @@ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIt
* in which case empty lines are skipped.
*/
#[TentativeType]
public function fgetcsv(string $separator = ',', string $enclosure = '"', string $escape = "\\"): array|false|null {}
public function fgetcsv(string $separator = ',', string $enclosure = '"', string $escape = "\\"): array|false {}
/**
* Write a field array as a CSV line
@ -754,7 +754,7 @@ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIt
* @since 5.4
*/
#[TentativeType]
public function fputcsv(array $fields, string $separator = ',', string $enclosure = '"', string $escape = "\\"): int|false {}
public function fputcsv(array $fields, string $separator = ',', string $enclosure = '"', string $escape = "\\", string $eol = PHP_EOL): int|false {}
/**
* Set the delimiter and enclosure character for CSV

View File

@ -73,7 +73,8 @@ function spl_autoload_unregister(callable $callback): bool {}
/**
* Return all registered __autoload() functions
* @link https://php.net/manual/en/function.spl-autoload-functions.php
* @return array An array of all registered __autoload functions.
* @return array|false An array of all registered __autoload functions.
* If the autoload stack is not activated then the return value is false.
* If no function is registered the return value will be an empty array.
* @since 5.1.2
*/

View File

@ -143,7 +143,7 @@ function bcsqrt(string $num, ?int $scale): string {}
* Set default scale parameter for all bc math functions
* @link https://php.net/manual/en/function.bcscale.php
* @param int $scale
* @return int
* @return int|bool
*/
function bcscale(int|null $scale = null): int {}

View File

@ -84,10 +84,10 @@ function bzclose($bz): bool {}
* The file pointer. It must be valid and must point to a file
* successfully opened by <b>bzopen</b>.
* </p>
* @return int|false the error number as an integer.
* @return int the error number as an integer.
*/
#[Pure]
function bzerrno($bz): int|false {}
function bzerrno($bz): int {}
/**
* Returns a bzip2 error string
@ -96,10 +96,10 @@ function bzerrno($bz): int|false {}
* The file pointer. It must be valid and must point to a file
* successfully opened by <b>bzopen</b>.
* </p>
* @return string|false a string containing the error message.
* @return string a string containing the error message.
*/
#[Pure]
function bzerrstr($bz): string|false {}
function bzerrstr($bz): string {}
/**
* Returns the bzip2 error number and error string in an array
@ -108,13 +108,13 @@ function bzerrstr($bz): string|false {}
* The file pointer. It must be valid and must point to a file
* successfully opened by <b>bzopen</b>.
* </p>
* @return array|false an associative array, with the error code in the
* @return array an associative array, with the error code in the
* errno entry, and the error message in the
* errstr entry.
*/
#[Pure]
#[ArrayShape(["errno" => "int", "errstr" => "string"])]
function bzerror($bz): array|false {}
function bzerror($bz): array {}
/**
* Compress a string into bzip2 encoded data

View File

@ -17,7 +17,7 @@ function ctype_alnum(mixed $text): bool {}
/**
* Check for alphabetic character(s)
* @link https://php.net/manual/en/function.ctype-alpha.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i> is
@ -29,7 +29,7 @@ function ctype_alpha(mixed $text): bool {}
/**
* Check for control character(s)
* @link https://php.net/manual/en/function.ctype-cntrl.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i> is
@ -41,7 +41,7 @@ function ctype_cntrl(mixed $text): bool {}
/**
* Check for numeric character(s)
* @link https://php.net/manual/en/function.ctype-digit.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in the string
@ -53,7 +53,7 @@ function ctype_digit(mixed $text): bool {}
/**
* Check for lowercase character(s)
* @link https://php.net/manual/en/function.ctype-lower.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i> is
@ -65,7 +65,7 @@ function ctype_lower(mixed $text): bool {}
/**
* Check for any printable character(s) except space
* @link https://php.net/manual/en/function.ctype-graph.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i> is
@ -78,7 +78,7 @@ function ctype_graph(mixed $text): bool {}
/**
* Check for printable character(s)
* @link https://php.net/manual/en/function.ctype-print.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i>
@ -93,7 +93,7 @@ function ctype_print(mixed $text): bool {}
* Check for any printable character which is not whitespace or an
* alphanumeric character
* @link https://php.net/manual/en/function.ctype-punct.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i>
@ -105,7 +105,7 @@ function ctype_punct(mixed $text): bool {}
/**
* Check for whitespace character(s)
* @link https://php.net/manual/en/function.ctype-space.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i>
@ -119,7 +119,7 @@ function ctype_space(mixed $text): bool {}
/**
* Check for uppercase character(s)
* @link https://php.net/manual/en/function.ctype-upper.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i> is
@ -131,7 +131,7 @@ function ctype_upper(mixed $text): bool {}
/**
* Check for character(s) representing a hexadecimal digit
* @link https://php.net/manual/en/function.ctype-xdigit.php
* @param string $text <p>
* @param mixed $text <p>
* The tested string.
* </p>
* @return bool <b>TRUE</b> if every character in <i>text</i> is

12
curl/CURLStringFile.php Normal file
View File

@ -0,0 +1,12 @@
<?php
/**
* @since 8.1
*/
class CURLStringFile
{
public string $data;
public string $mime;
public string $postname;
public function __construct(string $data, string $postname, string $mime = 'application/octet-stream') {}
}

View File

@ -2705,9 +2705,9 @@ function curl_share_strerror(int $error_code): ?string {}
class CURLFile
{
public $name;
public $mime;
public $postname;
public string $name;
public string $mime;
public string $postname;
/**
* Create a CURLFile object

View File

@ -4196,3 +4196,43 @@ define('CURLOPT_HTTP09_ALLOWED', 285);
* @since 7.3.6
*/
define('CURL_VERSION_ALTSVC', 16777216);
/**
* @since 8.1
*/
define('CURLOPT_DOH_URL', 10279);
/**
* @since 8.1
*/
define('CURLOPT_ISSUERCERT_BLOB', 40295);
/**
* @since 8.1
*/
define('CURLOPT_PROXY_ISSUERCERT', 10296);
/**
* @since 8.1
*/
define('CURLOPT_PROXY_ISSUERCERT_BLOB', 40297);
/**
* @since 8.1
*/
define('CURLOPT_PROXY_SSLCERT_BLOB', 40293);
/**
* @since 8.1
*/
define('CURLOPT_PROXY_SSLKEY_BLOB', 40294);
/**
* @since 8.1
*/
define('CURLOPT_SSLCERT_BLOB', 40291);
/**
* @since 8.1
*/
define('CURLOPT_SSLKEY_BLOB', 40292);

View File

@ -110,7 +110,7 @@ interface DateTimeInterface
/**
* (PHP 5 >=5.5.0)<br/>
* Returns the timezone offset
* @return int|false
* @return int
* Returns the timezone offset in seconds from UTC.
* @since 5.5
*/
@ -125,7 +125,7 @@ interface DateTimeInterface
* Returns the Unix timestamp representing the date.
*/
#[TentativeType]
public function getTimestamp(): int|false;
public function getTimestamp(): int;
/**
* (PHP 5 >=5.5.0)<br/>

View File

@ -91,14 +91,14 @@ class DOMNode
* Returns the most accurate name for the current node type
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nodename
*/
public $nodeName;
public string $nodeName;
/**
* @var string|null
* The value of this node, depending on its type
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nodevalue
*/
public $nodeValue;
public string|null $nodeValue;
/**
* @var int
@ -106,98 +106,98 @@ class DOMNode
* <a href="https://secure.php.net/manual/en/dom.constants.php">XML_xxx_NODE</a> constants
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nodetype
*/
public $nodeType;
public int $nodeType;
/**
* @var DOMNode|null
* The parent of this node. If there is no such node, this returns NULL.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.parentnode
*/
public $parentNode;
public DOMNode|null $parentNode;
/**
* @var DOMNodeList
* A <classname>DOMNodeList</classname> that contains all children of this node. If there are no children, this is an empty <classname>DOMNodeList</classname>.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.childnodes
*/
public $childNodes;
public DOMNodeList $childNodes;
/**
* @var DOMNode|null
* The first child of this node. If there is no such node, this returns NULL.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.firstchild
*/
public $firstChild;
public DOMNode|null $firstChild;
/**
* @var DOMNode|null
* The last child of this node. If there is no such node, this returns NULL.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.lastchild
*/
public $lastChild;
public DOMNode|null $lastChild;
/**
* @var DOMNode|null
* The node immediately preceding this node. If there is no such node, this returns NULL.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.previoussibling
*/
public $previousSibling;
public DOMNode|null $previousSibling;
/**
* @var DOMNode|null
* The node immediately following this node. If there is no such node, this returns NULL.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.nextsibling
*/
public $nextSibling;
public DOMNode|null $nextSibling;
/**
* @var DOMNamedNodeMap|null
* A <classname>DOMNamedNodeMap</classname> containing the attributes of this node (if it is a <classname>DOMElement</classname>) or NULL otherwise.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.attributes
*/
public $attributes;
public DOMNamedNodeMap|null $attributes;
/**
* @var DOMDocument|null
* The <classname>DOMDocument</classname> object associated with this node, or NULL if this node is a <classname>DOMDocument</classname>.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.ownerdocument
*/
public $ownerDocument;
public DOMDocument|null $ownerDocument;
/**
* @var string|null
* The namespace URI of this node, or NULL if it is unspecified.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.namespaceuri
*/
public $namespaceURI;
public string|null $namespaceURI;
/**
* @var string|null
* The namespace prefix of this node, or NULL if it is unspecified.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.prefix
*/
public $prefix;
public string $prefix;
/**
* @var string|null
* Returns the local part of the qualified name of this node.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.localname
*/
public $localName;
public string|null $localName;
/**
* @var string|null
* The absolute base URI of this node or NULL if the implementation wasn't able to obtain an absolute URI.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.baseuri
*/
public $baseURI;
public string|null $baseURI;
/**
* @var string
* This attribute returns the text content of this node and its descendants.
* @link https://php.net/manual/en/class.domnode.php#domnode.props.textcontent
*/
public $textContent;
public string $textContent;
/**
* Adds a new child before a reference node
@ -561,14 +561,14 @@ class DOMImplementation
class DOMNameSpaceNode
{
public $parentNode;
public $ownerDocument;
public $namespaceURI;
public $localName;
public $prefix;
public $nodeType;
public $nodeValue;
public $nodeName;
public DOMNode|null $parentNode;
public DOMDocument|null $ownerDocument;
public string|null $namespaceURI;
public string|null $localName;
public string $prefix;
public int $nodeType;
public string|null $nodeValue;
public string $nodeName;
}
/**
@ -577,9 +577,9 @@ class DOMNameSpaceNode
*/
class DOMDocumentFragment extends DOMNode implements DOMParentNode
{
public $childElementCount;
public $lastElementChild;
public $firstElementChild;
public int $childElementCount;
public DOMElement|null $lastElementChild;
public DOMElement|null $firstElementChild;
public function __construct() {}
@ -617,7 +617,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.actualencoding
*/
#[Deprecated("Actual encoding of the document, is a readonly equivalent to encoding.")]
public $actualEncoding;
public string|null $actualEncoding;
/**
* @var DOMConfiguration
@ -625,29 +625,29 @@ class DOMDocument extends DOMNode implements DOMParentNode
* @see DOMDocument::normalizeDocument()
*/
#[Deprecated("Configuration used when DOMDocument::normalizeDocument() is invoked.")]
public $config;
public mixed $config;
/**
* @var DOMDocumentType
* @var DOMDocumentType|null
* The Document Type Declaration associated with this document.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.doctype
*/
public $doctype;
public DOMDocumentType|null $doctype;
/**
* @var DOMElement
* @var DOMElement|null
* This is a convenience attribute that allows direct access to the child node
* that is the document element of the document.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documentelement
*/
public $documentElement;
public DOMElement|null $documentElement;
/**
* @var string|null
* The location of the document or NULL if undefined.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documenturi
*/
public $documentURI;
public string|null $documentURI;
/**
* @var string|null
@ -656,28 +656,28 @@ class DOMDocument extends DOMNode implements DOMParentNode
* encoding in this implementation.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.encoding
*/
public $encoding;
public string|null $encoding;
/**
* @var bool
* Nicely formats output with indentation and extra space.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.formatoutput
*/
public $formatOutput;
public bool $formatOutput;
/**
* @var DOMImplementation
* The <classname>DOMImplementation</classname> object that handles this document.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.implementation
*/
public $implementation;
public DOMImplementation $implementation;
/**
* @var bool
* Do not remove redundant white space. Default to TRUE.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.preservewhitespace
*/
public $preserveWhiteSpace = true;
public bool $preserveWhiteSpace = true;
/**
* @var bool
@ -685,7 +685,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
* This attribute is not part of the DOM specification and is specific to libxml.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.recover
*/
public $recover;
public bool $recover;
/**
* @var bool
@ -693,21 +693,21 @@ class DOMDocument extends DOMNode implements DOMParentNode
* including character entities in your XML document.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.resolveexternals
*/
public $resolveExternals;
public bool $resolveExternals;
/**
* @var bool
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.standalone
*/
#[Deprecated("Whether or not the document is standalone, as specified by the XML declaration, corresponds to xmlStandalone.")]
public $standalone;
public bool $standalone;
/**
* @var bool
* Throws <classname>DOMException</classname> on errors. Default to TRUE.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.stricterrorchecking
*/
public $strictErrorChecking = true;
public bool $strictErrorChecking = true;
/**
* @var bool
@ -715,21 +715,21 @@ class DOMDocument extends DOMNode implements DOMParentNode
* specification and is specific to libxml.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.substituteentities
*/
public $substituteEntities;
public bool $substituteEntities;
/**
* @var bool
* Loads and validates against the DTD. Default to FALSE.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.validateonparse
*/
public $validateOnParse = false;
public bool $validateOnParse = false;
/**
* @var string
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.version
*/
#[Deprecated("Version of XML, corresponds to xmlVersion")]
public $version;
public string|null $version;
/**
* @var string|null
@ -737,7 +737,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
* unspecified or when it is not known, such as when the Document was created in memory.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlencoding
*/
public $xmlEncoding;
public string|null $xmlEncoding;
/**
* @var bool
@ -745,7 +745,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
* This is FALSE when unspecified.
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlstandalone
*/
public $xmlStandalone;
public bool $xmlStandalone;
/**
* @var string|null
@ -753,10 +753,10 @@ class DOMDocument extends DOMNode implements DOMParentNode
* declaration and if this document supports the "XML" feature, the value is "1.0".
* @link https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlversion
*/
public $xmlVersion;
public $childElementCount;
public $lastElementChild;
public $firstElementChild;
public string|null $xmlVersion;
public int $childElementCount;
public DOMElement|null $lastElementChild;
public DOMElement|null $firstElementChild;
/**
* Creates a new DOMDocument object
@ -1190,7 +1190,7 @@ class DOMNodeList implements IteratorAggregate, Countable
* @link https://php.net/manual/en/class.domnodelist.php#domnodelist.props.length
*/
#[Immutable]
public $length;
public int $length;
/**
* Retrieves a node specified by index
@ -1313,16 +1313,16 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
* The contents of the node.
* @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.data
*/
public $data;
public string $data;
/**
* @var int
* The length of the contents.
* @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.length
*/
public $length;
public $nextElementSibling;
public $previousElementSibling;
public int $length;
public DOMElement|null $nextElementSibling;
public DOMElement|null $previousElementSibling;
/**
* Extracts a range of data from the node
@ -1432,23 +1432,23 @@ class DOMAttr extends DOMNode
* The name of the attribute
* @link https://php.net/manual/en/class.domattr.php#domattr.props.name
*/
public $name;
public string $name;
/**
* @var DOMElement
* @var DOMElement|null
* (PHP5)<br/>
* The element which contains the attribute
* @link https://php.net/manual/en/class.domattr.php#domattr.props.ownerelement
*/
public $ownerElement;
public DOMElement|null $ownerElement;
/**
* @var bool
* @var mixed
* (PHP5)<br/>
* Not implemented yet, always is NULL
* @link https://php.net/manual/en/class.domattr.php#domattr.props.schematypeinfo
*/
public $schemaTypeInfo;
public mixed $schemaTypeInfo;
/**
* @var bool
@ -1456,7 +1456,7 @@ class DOMAttr extends DOMNode
* Not implemented yet, always is NULL
* @link https://php.net/manual/en/class.domattr.php#domattr.props.specified
*/
public $specified;
public bool $specified;
/**
* @var string
@ -1464,7 +1464,7 @@ class DOMAttr extends DOMNode
* The value of the attribute
* @link https://php.net/manual/en/class.domattr.php#domattr.props.value
*/
public $value;
public string $value;
/**
* Creates a new {@see DOMAttr} object
@ -1530,19 +1530,19 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
* Not implemented yet, always return NULL
* @link https://php.net/manual/en/class.domelement.php#domelement.props.schematypeinfo
*/
public $schemaTypeInfo;
public mixed $schemaTypeInfo;
/**
* @var string
* The element name
* @link https://php.net/manual/en/class.domelement.php#domelement.props.tagname
*/
public $tagName;
public $firstElementChild;
public $lastElementChild;
public $childElementCount;
public $previousElementSibling;
public $nextElementSibling;
public string $tagName;
public DOMElement|null $firstElementChild;
public DOMElement|null $lastElementChild;
public int $childElementCount;
public DOMElement|null $previousElementSibling;
public DOMElement|null $nextElementSibling;
/**
* Creates a new DOMElement object
@ -1833,7 +1833,7 @@ class DOMText extends DOMCharacterData
* Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes.
* @link https://php.net/manual/en/class.domtext.php#domtext.props.wholeText
*/
public $wholeText;
public string $wholeText;
/**
* Creates a new <classname>DOMText</classname> object
@ -1967,42 +1967,42 @@ class DOMDocumentType extends DOMNode
* The public identifier of the external subset.
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.publicid
*/
public $publicId;
public string $publicId;
/**
* @var string
* The system identifier of the external subset. This may be an absolute URI or not.
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.systemid
*/
public $systemId;
public string $systemId;
/**
* @var string
* The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.name
*/
public $name;
public string $name;
/**
* @var DOMNamedNodeMap
* A <classname>DOMNamedNodeMap</classname> containing the general entities, both external and internal, declared in the DTD.
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.entities
*/
public $entities;
public DOMNamedNodeMap $entities;
/**
* @var DOMNamedNodeMap
* A <clasname>DOMNamedNodeMap</classname> containing the notations declared in the DTD.
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.notations
*/
public $notations;
public DOMNamedNodeMap $notations;
/**
* @var string|null
* The internal subset as a string, or null if there is none. This is does not contain the delimiting square brackets.
* @link https://php.net/manual/en/class.domdocumenttype.php#domdocumenttype.props.internalsubset
*/
public $internalSubset;
public string|null $internalSubset;
}
/**
@ -2016,14 +2016,14 @@ class DOMNotation extends DOMNode
*
* @link https://php.net/manual/en/class.domnotation.php#domnotation.props.publicid
*/
public $publicId;
public string $publicId;
/**
* @var string
*
* @link https://php.net/manual/en/class.domnotation.php#domnotation.props.systemid
*/
public $systemId;
public string $systemId;
}
/**
@ -2037,7 +2037,7 @@ class DOMEntity extends DOMNode
* The public identifier associated with the entity if specified, and NULL otherwise.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.publicid
*/
public $publicId;
public string|null $publicId;
/**
* @var string|null
@ -2045,14 +2045,14 @@ class DOMEntity extends DOMNode
* absolute URI or not.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.systemid
*/
public $systemId;
public string|null $systemId;
/**
* @var string|null
* For unparsed entities, the name of the notation for the entity. For parsed entities, this is NULL.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.notationname
*/
public $notationName;
public string|null $notationName;
/**
* @var string|null
@ -2060,7 +2060,7 @@ class DOMEntity extends DOMNode
* parsed entity. This is NULL if it an entity from the internal subset or if it is not known.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.actualencoding
*/
public $actualEncoding;
public string|null $actualEncoding;
/**
* @var string|null
@ -2068,7 +2068,7 @@ class DOMEntity extends DOMNode
* parsed entity. This is NULL otherwise.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.encoding
*/
public $encoding;
public string|null $encoding;
/**
* @var string|null
@ -2076,7 +2076,7 @@ class DOMEntity extends DOMNode
* external parsed entity. This is NULL otherwise.
* @link https://php.net/manual/en/class.domentity.php#domentity.props.version
*/
public $version;
public string|null $version;
}
/**
@ -2102,12 +2102,12 @@ class DOMProcessingInstruction extends DOMNode
/**
* @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.target
*/
public $target;
public string $target;
/**
* @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.data
*/
public $data;
public string $data;
/**
* Creates a new <classname>DOMProcessingInstruction</classname> object
@ -2142,8 +2142,8 @@ class DOMXPath
*
* @link https://php.net/manual/en/class.domxpath.php#domxpath.props.document
*/
public $document;
public $registerNodeNamespaces;
public DOMDocument $document;
public bool $registerNodeNamespaces;
/**
* Creates a new <classname>DOMXPath</classname> object

View File

@ -83,9 +83,9 @@ define('FILEINFO_EXTENSION', 2097152);
* A .mime and/or .mgc suffix is added if
* needed.
* </p>
* @return resource|false a magic database resource on success or <b>FALSE</b> on failure.
* @return finfo|false a magic database resource on success or <b>FALSE</b> on failure.
*/
function finfo_open(int $flags = 0, ?string $magic_database = null) {}
function finfo_open(int $flags = 0, ?string $magic_database = null): finfo|false {}
/**
* (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
@ -96,7 +96,7 @@ function finfo_open(int $flags = 0, ?string $magic_database = null) {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function finfo_close($finfo): bool {}
function finfo_close(finfo $finfo): bool {}
/**
* (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
@ -111,7 +111,7 @@ function finfo_close($finfo): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function finfo_set_flags($finfo, int $flags): bool {}
function finfo_set_flags(finfo $finfo, int $flags): bool {}
/**
* (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
@ -133,7 +133,7 @@ function finfo_set_flags($finfo, int $flags): bool {}
* @return string|false a textual description of the contents of the
* <i>filename</i> argument, or <b>FALSE</b> if an error occurred.
*/
function finfo_file($finfo, string $filename, int $flags = 0, $context): string|false {}
function finfo_file(finfo $finfo, string $filename, int $flags = 0, $context): string|false {}
/**
* (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)<br/>
@ -151,7 +151,7 @@ function finfo_file($finfo, string $filename, int $flags = 0, $context): string|
* @return string|false a textual description of the <i>string</i>
* argument, or <b>FALSE</b> if an error occurred.
*/
function finfo_buffer($finfo, string $string, int $flags = FILEINFO_NONE, $context): string|false {}
function finfo_buffer(finfo $finfo, string $string, int $flags = FILEINFO_NONE, $context): string|false {}
/**
* Detect MIME Content-type for a file

8
ftp/Connection.php Normal file
View File

@ -0,0 +1,8 @@
<?php
namespace FTP;
/**
* @since 8.1
*/
final class Connection {}

View File

@ -1,5 +1,6 @@
<?php
use FTP\Connection;
use JetBrains\PhpStorm\ExpectedValues;
/**
@ -79,23 +80,23 @@ define('FTP_MOREDATA', 2);
/**
* append the contents of a file to another file on the ftp server
* @param resource $ftp
* @param Connection $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 = FTP_BINARY): bool {}
function ftp_append(Connection $ftp, string $remote_filename, string $local_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY): bool {}
/**
* returns a list of files in the given directory
* @param resource $ftp
* @param Connection $ftp
* @param string $directory
* @return array|false
* @since 7.2
*/
function ftp_mlsd($ftp, string $directory): array|false {}
function ftp_mlsd(Connection $ftp, string $directory): array|false {}
/**
* Opens an FTP connection
@ -114,9 +115,9 @@ function ftp_mlsd($ftp, string $directory): array|false {}
* queried at any time with <b>ftp_set_option</b> and
* <b>ftp_get_option</b>.
* </p>
* @return resource|false a FTP stream on success or <b>FALSE</b> on error.
* @return Connection|false a FTP stream on success or <b>FALSE</b> on error.
*/
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) {}
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): Connection|false {}
/**
* Opens a Secure SSL-FTP connection
@ -135,14 +136,14 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) {}
* queried at any time with <b>ftp_set_option</b> and
* <b>ftp_get_option</b>.
* </p>
* @return resource|false a SSL-FTP stream on success or <b>FALSE</b> on error.
* @return Connection|false a SSL-FTP stream on success or <b>FALSE</b> on error.
*/
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) {}
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): Connection|false {}
/**
* Logs in to an FTP connection
* @link https://php.net/manual/en/function.ftp-login.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $username <p>
@ -154,32 +155,32 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) {}
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* If login fails, PHP will also throw a warning.
*/
function ftp_login($ftp, string $username, string $password): bool {}
function ftp_login(Connection $ftp, string $username, string $password): bool {}
/**
* Returns the current directory name
* @link https://php.net/manual/en/function.ftp-pwd.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return string|false the current directory name or <b>FALSE</b> on error.
*/
function ftp_pwd($ftp): string|false {}
function ftp_pwd(Connection $ftp): string|false {}
/**
* Changes to the parent directory
* @link https://php.net/manual/en/function.ftp-cdup.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_cdup($ftp): bool {}
function ftp_cdup(Connection $ftp): bool {}
/**
* Changes the current directory on a FTP server
* @link https://php.net/manual/en/function.ftp-chdir.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
@ -188,12 +189,12 @@ function ftp_cdup($ftp): bool {}
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* If changing directory fails, PHP will also throw a warning.
*/
function ftp_chdir($ftp, string $directory): bool {}
function ftp_chdir(Connection $ftp, string $directory): bool {}
/**
* Requests execution of a command on the FTP server
* @link https://php.net/manual/en/function.ftp-exec.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
@ -202,12 +203,12 @@ function ftp_chdir($ftp, string $directory): bool {}
* @return bool <b>TRUE</b> if the command was successful (server sent response code:
* 200); otherwise returns <b>FALSE</b>.
*/
function ftp_exec($ftp, string $command): bool {}
function ftp_exec(Connection $ftp, string $command): bool {}
/**
* Sends an arbitrary command to an FTP server
* @link https://php.net/manual/en/function.ftp-raw.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
@ -217,12 +218,12 @@ function ftp_exec($ftp, string $command): bool {}
* No parsing is performed on the response string, nor does
* <b>ftp_raw</b> determine if the command succeeded.
*/
function ftp_raw($ftp, string $command): array|null {}
function ftp_raw(Connection $ftp, string $command): array|null {}
/**
* Creates a directory
* @link https://php.net/manual/en/function.ftp-mkdir.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
@ -230,12 +231,12 @@ function ftp_raw($ftp, string $command): array|null {}
* </p>
* @return string|false the newly created directory name on success or <b>FALSE</b> on error.
*/
function ftp_mkdir($ftp, string $directory): string|false {}
function ftp_mkdir(Connection $ftp, string $directory): string|false {}
/**
* Removes a directory
* @link https://php.net/manual/en/function.ftp-rmdir.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
@ -244,12 +245,12 @@ function ftp_mkdir($ftp, string $directory): string|false {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_rmdir($ftp, string $directory): bool {}
function ftp_rmdir(Connection $ftp, string $directory): bool {}
/**
* Set permissions on a file via FTP
* @link https://php.net/manual/en/function.ftp-chmod.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param int $permissions <p>
@ -260,12 +261,12 @@ function ftp_rmdir($ftp, string $directory): bool {}
* </p>
* @return int|false the new file permissions on success or <b>FALSE</b> on error.
*/
function ftp_chmod($ftp, int $permissions, string $filename): int|false {}
function ftp_chmod(Connection $ftp, int $permissions, string $filename): int|false {}
/**
* Allocates space for a file to be uploaded
* @link https://php.net/manual/en/function.ftp-alloc.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param int $size <p>
@ -277,12 +278,12 @@ function ftp_chmod($ftp, int $permissions, string $filename): int|false {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_alloc($ftp, int $size, &$response): bool {}
function ftp_alloc(Connection $ftp, int $size, &$response): bool {}
/**
* Returns a list of files in the given directory
* @link https://php.net/manual/en/function.ftp-nlist.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
@ -294,12 +295,12 @@ function ftp_alloc($ftp, int $size, &$response): bool {}
* @return string[]|false an array of filenames from the specified directory on success or
* <b>FALSE</b> on error.
*/
function ftp_nlist($ftp, string $directory): array|false {}
function ftp_nlist(Connection $ftp, string $directory): array|false {}
/**
* Returns a detailed list of files in the given directory
* @link https://php.net/manual/en/function.ftp-rawlist.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
@ -316,22 +317,22 @@ function ftp_nlist($ftp, string $directory): array|false {}
* should be interpreted.
* </p>
*/
function ftp_rawlist($ftp, string $directory, bool $recursive = false): array|false {}
function ftp_rawlist(Connection $ftp, string $directory, bool $recursive = false): array|false {}
/**
* Returns the system type identifier of the remote FTP server
* @link https://php.net/manual/en/function.ftp-systype.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return string|false the remote system type, or <b>FALSE</b> on error.
*/
function ftp_systype($ftp): string|false {}
function ftp_systype(Connection $ftp): string|false {}
/**
* Turns passive mode on or off
* @link https://php.net/manual/en/function.ftp-pasv.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param bool $enable <p>
@ -339,12 +340,12 @@ function ftp_systype($ftp): string|false {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_pasv($ftp, bool $enable): bool {}
function ftp_pasv(Connection $ftp, bool $enable): bool {}
/**
* Downloads a file from the FTP server
* @link https://php.net/manual/en/function.ftp-get.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $local_filename <p>
@ -361,12 +362,12 @@ function ftp_pasv($ftp, bool $enable): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_get($ftp, string $local_filename, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_get(Connection $ftp, string $local_filename, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
/**
* Downloads a file from the FTP server and saves to an open file
* @link https://php.net/manual/en/function.ftp-fget.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param resource $stream <p>
@ -383,12 +384,12 @@ function ftp_get($ftp, string $local_filename, string $remote_filename, #[Expect
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_fget($ftp, $stream, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_fget(Connection $ftp, $stream, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
/**
* Uploads a file to the FTP server
* @link https://php.net/manual/en/function.ftp-put.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_filename <p>
@ -403,12 +404,12 @@ function ftp_fget($ftp, $stream, string $remote_filename, #[ExpectedValues([FTP_
* @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_put($ftp, string $remote_filename, string $local_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_put(Connection $ftp, string $remote_filename, string $local_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
/**
* Uploads from an open file to the FTP server
* @link https://php.net/manual/en/function.ftp-fput.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_filename <p>
@ -423,12 +424,12 @@ function ftp_put($ftp, string $remote_filename, string $local_filename, #[Expect
* @param int $offset [optional] <p>The position in the remote file to start uploading to.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_fput($ftp, string $remote_filename, $stream, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
function ftp_fput(Connection $ftp, string $remote_filename, $stream, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): bool {}
/**
* Returns the size of the given file
* @link https://php.net/manual/en/function.ftp-size.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $filename <p>
@ -436,12 +437,12 @@ function ftp_fput($ftp, string $remote_filename, $stream, #[ExpectedValues([FTP_
* </p>
* @return int the file size on success, or -1 on error.
*/
function ftp_size($ftp, string $filename): int {}
function ftp_size(Connection $ftp, string $filename): int {}
/**
* Returns the last modified time of the given file
* @link https://php.net/manual/en/function.ftp-mdtm.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $filename <p>
@ -450,12 +451,12 @@ function ftp_size($ftp, string $filename): int {}
* @return int the last modified time as a Unix timestamp on success, or -1 on
* error.
*/
function ftp_mdtm($ftp, string $filename): int {}
function ftp_mdtm(Connection $ftp, string $filename): int {}
/**
* Renames a file or a directory on the FTP server
* @link https://php.net/manual/en/function.ftp-rename.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $from <p>
@ -466,12 +467,12 @@ function ftp_mdtm($ftp, string $filename): int {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_rename($ftp, string $from, string $to): bool {}
function ftp_rename(Connection $ftp, string $from, string $to): bool {}
/**
* Deletes a file on the FTP server
* @link https://php.net/manual/en/function.ftp-delete.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $filename <p>
@ -479,12 +480,12 @@ function ftp_rename($ftp, string $from, string $to): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_delete($ftp, string $filename): bool {}
function ftp_delete(Connection $ftp, string $filename): bool {}
/**
* Sends a SITE command to the server
* @link https://php.net/manual/en/function.ftp-site.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
@ -493,22 +494,22 @@ function ftp_delete($ftp, string $filename): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_site($ftp, string $command): bool {}
function ftp_site(Connection $ftp, string $command): bool {}
/**
* Closes an FTP connection
* @link https://php.net/manual/en/function.ftp-close.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_close($ftp): bool {}
function ftp_close(Connection $ftp): bool {}
/**
* Set miscellaneous runtime FTP options
* @link https://php.net/manual/en/function.ftp-set-option.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param int $option <p>
@ -543,12 +544,12 @@ function ftp_close($ftp): bool {}
* supported or the passed <i>value</i> doesn't match the
* expected value for the given <i>option</i>.
*/
function ftp_set_option($ftp, #[ExpectedValues([FTP_TIMEOUT_SEC, FTP_AUTOSEEK, FTP_USEPASVADDRESS])] int $option, $value): bool {}
function ftp_set_option(Connection $ftp, #[ExpectedValues([FTP_TIMEOUT_SEC, FTP_AUTOSEEK, FTP_USEPASVADDRESS])] int $option, $value): bool {}
/**
* Retrieves various runtime behaviours of the current FTP stream
* @link https://php.net/manual/en/function.ftp-get-option.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param int $option <p>
@ -573,12 +574,12 @@ function ftp_set_option($ftp, #[ExpectedValues([FTP_TIMEOUT_SEC, FTP_AUTOSEEK, F
* <i>option</i> is not supported. In the latter case, a
* warning message is also thrown.
*/
function ftp_get_option($ftp, #[ExpectedValues([FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int $option): int|bool {}
function ftp_get_option(Connection $ftp, #[ExpectedValues([FTP_TIMEOUT_SEC, FTP_AUTOSEEK])] int $option): int|bool {}
/**
* Retrieves a file from the FTP server and writes it to an open file (non-blocking)
* @link https://php.net/manual/en/function.ftp-nb-fget.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param resource $stream <p>
@ -595,12 +596,12 @@ function ftp_get_option($ftp, #[ExpectedValues([FTP_TIMEOUT_SEC, FTP_AUTOSEEK])]
* or <b>FTP_MOREDATA</b>.
*/
#[ExpectedValues([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_fget($ftp, $stream, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_nb_fget(Connection $ftp, $stream, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
/**
* Retrieves a file from the FTP server and writes it to a local file (non-blocking)
* @link https://php.net/manual/en/function.ftp-nb-get.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $local_filename <p>
@ -617,24 +618,24 @@ function ftp_nb_fget($ftp, $stream, string $remote_filename, #[ExpectedValues([F
* or <b>FTP_MOREDATA</b>.
*/
#[ExpectedValues([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_get($ftp, string $local_filename, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_nb_get(Connection $ftp, string $local_filename, string $remote_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
/**
* Continues retrieving/sending a file (non-blocking)
* @link https://php.net/manual/en/function.ftp-nb-continue.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
* or <b>FTP_MOREDATA</b>.
*/
#[ExpectedValues([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_continue($ftp): int {}
function ftp_nb_continue(Connection $ftp): int {}
/**
* Stores a file on the FTP server (non-blocking)
* @link https://php.net/manual/en/function.ftp-nb-put.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_filename <p>
@ -651,12 +652,12 @@ function ftp_nb_continue($ftp): int {}
* or <b>FTP_MOREDATA</b>.
*/
#[ExpectedValues([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_put($ftp, string $remote_filename, string $local_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int|false {}
function ftp_nb_put(Connection $ftp, string $remote_filename, string $local_filename, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int|false {}
/**
* Stores a file from an open file to the FTP server (non-blocking)
* @link https://php.net/manual/en/function.ftp-nb-fput.php
* @param resource $ftp <p>
* @param Connection $ftp <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_filename <p>
@ -673,12 +674,12 @@ function ftp_nb_put($ftp, string $remote_filename, string $local_filename, #[Exp
* or <b>FTP_MOREDATA</b>.
*/
#[ExpectedValues([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])]
function ftp_nb_fput($ftp, string $remote_filename, $stream, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
function ftp_nb_fput(Connection $ftp, string $remote_filename, $stream, #[ExpectedValues([FTP_ASCII, FTP_BINARY])] int $mode = FTP_BINARY, int $offset = 0): int {}
/**
* Alias of <b>ftp_close</b>
* @link https://php.net/manual/en/function.ftp-quit.php
* @param resource $ftp
* @param Connection $ftp
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_quit($ftp): bool {}
function ftp_quit(Connection $ftp): bool {}

5
gd/GdFont.php Normal file
View File

@ -0,0 +1,5 @@
<?php
/**
* @since 8.1
*/
final class GdFont {}

View File

@ -580,6 +580,16 @@ define('IMG_TRIANGLE', 20);
define('IMG_TGA', 128);
/**
* @since 8.1
*/
define('IMG_AVIF', 256);
/**
* @since 8.1
*/
define('IMG_WEBP_LOSSLESS', 101);
/**
* Retrieve information about the currently installed GD library
* @link https://php.net/manual/en/function.gd-info.php
@ -738,7 +748,7 @@ function imageellipse(GdImage $image, int $center_x, int $center_y, int $width,
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagechar(GdImage $image, int $font, int $x, int $y, string $char, int $color): bool {}
function imagechar(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {}
/**
* Draw a character vertically
@ -760,7 +770,7 @@ function imagechar(GdImage $image, int $font, int $x, int $y, string $char, int
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecharup(GdImage $image, int $font, int $x, int $y, string $char, int $color): bool {}
function imagecharup(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {}
/**
* Get the index of the color of a pixel
@ -1421,6 +1431,15 @@ function imagesetstyle(GdImage $image, array $style): bool {}
*/
function imagecreatefrompng(string $filename): GdImage|false {}
/**
* Create a new image from file or URL
* @link https://www.php.net/manual/function.imagecreatefromavif.php
* @param string $filename Path to the AVIF raster image.
* @return GdImage|false returns an image object representing the image obtained from the given filename
* @since 8.1
*/
function imagecreatefromavif(string $filename): GdImage|false {}
/**
* Create a new image from file or URL
* @link https://php.net/manual/en/function.imagecreatefromgif.php
@ -1761,7 +1780,7 @@ function imagefilltoborder(GdImage $image, int $x, int $y, int $border_color, in
* @return int the width of the pixel
*/
#[Pure]
function imagefontwidth(int $font): int {}
function imagefontwidth(GdFont|int $font): int {}
/**
* Get font height
@ -1770,7 +1789,7 @@ function imagefontwidth(int $font): int {}
* @return int the height of the pixel.
*/
#[Pure]
function imagefontheight(int $font): int {}
function imagefontheight(GdFont|int $font): int {}
/**
* Enable or disable interlace
@ -1857,10 +1876,10 @@ function imageline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $colo
* </tr>
* </table>
* </p>
* @return int|false The font identifier which is always bigger than 5 to avoid conflicts with
* @return GdFont|false The font identifier which is always bigger than 5 to avoid conflicts with
* built-in fonts or false on errors.
*/
function imageloadfont(string $filename): int|false {}
function imageloadfont(string $filename): GdFont|false {}
/**
* Draws a polygon
@ -1959,7 +1978,7 @@ function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {}
* </p>
* @return bool true on success or false on failure.
*/
function imagestring(GdImage $image, int $font, int $x, int $y, string $string, int $color): bool {}
function imagestring(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {}
/**
* Draw a string vertically
@ -1981,7 +2000,7 @@ function imagestring(GdImage $image, int $font, int $x, int $y, string $string,
* </p>
* @return bool true on success or false on failure.
*/
function imagestringup(GdImage $image, int $font, int $x, int $y, string $string, int $color): bool {}
function imagestringup(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {}
/**
* Get image width
@ -2593,6 +2612,18 @@ function imagegrabwindow($handle, $client_area = null) {}
#[Pure]
function imagegetinterpolation(GdImage $image): int {}
/**
* Outputs or saves a AVIF Raster image from the given image
* @link https://www.php.net/manual/function.imageavif.php
* @param GdImage $image A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor().
* @param resource|string|null $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or null, the raw image stream will be output directly.
* @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, larger file). If -1 is provided, the default value 30 is used.
* @param int $speed speed is optional, and ranges from 0 (slow, smaller file) to 10 (fast, larger file). If -1 is provided, the default value 6 is used.
* @return bool Returns true on success or false on failure. However, if libgd fails to output the image, this function returns true.
* @since 8.1
*/
function imageavif(GdImage $image, string|null $file = null, int $quality = -1, int $speed = -1): bool {}
/**
* Return an image containing the affine tramsformed src image, using an optional clipping area
* @link https://secure.php.net/manual/en/function.imageaffine.php

View File

@ -78,6 +78,41 @@ define('MHASH_FNV1A64', 32);
define('MHASH_JOAAT', 33);
/**
* @since 8.1
*/
define('MHASH_MURMUR3A', 35);
/**
* @since 8.1
*/
define('MHASH_MURMUR3C', 36);
/**
* @since 8.1
*/
define('MHASH_MURMUR3F', 37);
/**
* @since 8.1
*/
define('MHASH_XXH32', 38);
/**
* @since 8.1
*/
define('MHASH_XXH64', 39);
/**
* @since 8.1
*/
define('MHASH_XXH3', 40);
/**
* @since 8.1
*/
define('MHASH_XXH128', 41);
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
* Generate a hash value (message digest)
@ -97,7 +132,7 @@ define('MHASH_JOAAT', 33);
* binary representation of the message digest is returned.
*/
#[Pure]
function hash(string $algo, string $data, bool $binary = false): string {}
function hash(string $algo, string $data, bool $binary = false, array $options = []): string {}
/**
* Timing attack safe string comparison
@ -129,7 +164,7 @@ function hash_equals(string $known_string, string $user_string): bool {}
* binary representation of the message digest is returned.
*/
#[Pure]
function hash_file(string $algo, string $filename, bool $binary = false): string|false {}
function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false {}
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>
@ -204,7 +239,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 = ''): HashContext {}
function hash_init(string $algo, int $flags = 0, string $key = '', array $options = []): HashContext {}
/**
* (PHP 5 >= 5.1.2, PECL hash >= 1.1)<br/>

8
imap/Connection.php Normal file
View File

@ -0,0 +1,8 @@
<?php
namespace IMAP;
/**
* @since 8.1
*/
final class Connection {}

View File

@ -1,5 +1,6 @@
<?php
use IMAP\Connection;
use JetBrains\PhpStorm\ArrayShape;
/**
@ -301,14 +302,14 @@ define('IMAP_GC_TEXTS', 4);
* Connection parameters, the following (string) keys maybe used
* to set one or more connection parameters:
* DISABLE_AUTHENTICATOR - Disable authentication properties</p>
* @return resource|false an IMAP stream on success or <b>FALSE</b> on error.
* @return Connection|false an IMAP stream on success or <b>FALSE</b> on error.
*/
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) {}
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []): Connection|false {}
/**
* Reopen IMAP stream to new mailbox
* @link https://php.net/manual/en/function.imap-reopen.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
@ -322,12 +323,12 @@ function imap_open(string $mailbox, string $user, string $password, int $flags =
* </p>
* @return bool <b>TRUE</b> if the stream is reopened, <b>FALSE</b> otherwise.
*/
function imap_reopen($imap, string $mailbox, int $flags = 0, int $retries = 0): bool {}
function imap_reopen(Connection $imap, string $mailbox, int $flags = 0, int $retries = 0): bool {}
/**
* Close an IMAP stream
* @link https://php.net/manual/en/function.imap-close.php
* @param resource $imap
* @param Connection $imap
* @param int $flags [optional] <p>
* If set to <b>CL_EXPUNGE</b>, the function will silently
* expunge the mailbox before closing, removing all messages marked for
@ -336,42 +337,41 @@ function imap_reopen($imap, string $mailbox, int $flags = 0, int $retries = 0):
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_close($imap, int $flags = 0): bool {}
function imap_close(Connection $imap, int $flags = 0): bool {}
/**
* Gets the number of messages in the current mailbox
* @link https://php.net/manual/en/function.imap-num-msg.php
* @param resource $imap
* @param Connection $imap
* @return int|false Return the number of messages in the current mailbox, as an integer.
*/
function imap_num_msg($imap): int|false {}
function imap_num_msg(Connection $imap): int|false {}
/**
* Gets the number of recent messages in current mailbox
* @link https://php.net/manual/en/function.imap-num-recent.php
* @param resource $imap
* @param Connection $imap
* @return int the number of recent messages in the current mailbox, as an
* integer.
*/
function imap_num_recent($imap): int {}
function imap_num_recent(Connection $imap): int {}
/**
* Returns headers for all messages in a mailbox
* @link https://php.net/manual/en/function.imap-headers.php
* @param resource $imap
* @param Connection $imap
* @return array|false an array of string formatted with header info. One
* element per mail message.
*/
function imap_headers($imap): array|false {}
function imap_headers(Connection $imap): array|false {}
/**
* Read the header of the message
* @link https://php.net/manual/en/function.imap-headerinfo.php
* @param resource|IMAP\Connection $imap An IMAP stream returned by imap_open().
* @param Connection $imap An IMAP stream returned by imap_open().
* @param int $message_num The message number
* @param int $from_length [optional] Number of characters for the fetchfrom property. Must be greater than or equal to zero.
* @param int $subject_length [optional] Number of characters for the fetchsubject property Must be greater than or equal to zero.
* @param $default_host [optional]
* @return stdClass|false Returns the information in an object with following properties:
* <dl>
* <dt>toaddress</dt><dd>full to: line, up to 1024 characters</dd>
@ -412,7 +412,7 @@ function imap_headers($imap): array|false {}
* <dt>fetchsubject</dt><dd>subject line formatted to fit subjectlength characters</dd>
* </dl>
*/
function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $subject_length = 0): stdClass|false {}
function imap_headerinfo(Connection $imap, int $message_num, int $from_length = 0, int $subject_length = 0): stdClass|false {}
/**
* Parse mail headers from a string
@ -423,7 +423,7 @@ function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $sub
* @param string $default_hostname [optional] <p>
* The default host name
* </p>
* @return object|stdClass an object similar to the one returned by
* @return stdClass an object similar to the one returned by
* <b>imap_header</b>, except for the flags and other
* properties that come from the IMAP server.
*/
@ -468,7 +468,7 @@ function imap_rfc822_parse_adrlist(string $string, string $default_hostname): ar
/**
* Read the message body
* @link https://php.net/manual/en/function.imap-body.php
* @param resource $imap
* @param Connection $imap
* @param int $message_num <p>
* The message number
* </p>
@ -478,28 +478,28 @@ function imap_rfc822_parse_adrlist(string $string, string $default_hostname): ar
* <b>FT_UID</b> - The <i>msg_number</i> is a UID</p>
* @return string|false the body of the specified message, as a string.
*/
function imap_body($imap, int $message_num, int $flags = 0): string|false {}
function imap_body(Connection $imap, int $message_num, int $flags = 0): string|false {}
/**
* Read the structure of a specified body section of a specific message
* @link https://php.net/manual/en/function.imap-bodystruct.php
* @param resource $imap
* @param Connection $imap
* @param int $message_num <p>
* The message number
* </p>
* @param string $section <p>
* The body section to read
* </p>
* @return object the information in an object, for a detailed description
* @return stdClass|false the information in an object, for a detailed description
* of the object structure and properties see
* <b>imap_fetchstructure</b>.
*/
function imap_bodystruct($imap, int $message_num, string $section): object {}
function imap_bodystruct(Connection $imap, int $message_num, string $section): stdClass|false {}
/**
* Fetch a particular section of the body of the message
* @link https://php.net/manual/en/function.imap-fetchbody.php
* @param resource $imap
* @param Connection $imap
* @param int $message_num <p>
* The message number
* </p>
@ -513,12 +513,12 @@ function imap_bodystruct($imap, int $message_num, string $section): object {}
* @return string|false a particular section of the body of the specified messages as a
* text string.
*/
function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0): string|false {}
function imap_fetchbody(Connection $imap, int $message_num, string $section, int $flags = 0): string|false {}
/**
* Fetch MIME headers for a particular section of the message
* @link https://php.net/manual/en/function.imap-fetchmime.php
* @param resource $imap
* @param Connection $imap
* @param int $message_num <p>
* The message number
* </p>
@ -533,12 +533,12 @@ function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0
* text string.
* @since 5.3.6
*/
function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0): string|false {}
function imap_fetchmime(Connection $imap, int $message_num, string $section, int $flags = 0): string|false {}
/**
* Save a specific body section to a file
* @link https://php.net/manual/en/function.imap-savebody.php
* @param resource $imap
* @param Connection $imap
* @param mixed $file <p>
* The path to the saved file as a string, or a valid file descriptor
* returned by <b>fopen</b>.
@ -556,12 +556,12 @@ function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.1.3
*/
function imap_savebody($imap, $file, int $message_num, string $section = '', int $flags = 0): bool {}
function imap_savebody(Connection $imap, $file, int $message_num, string $section = '', int $flags = 0): bool {}
/**
* Returns header for a message
* @link https://php.net/manual/en/function.imap-fetchheader.php
* @param resource $imap
* @param Connection $imap
* @param int $message_num <p>
* The message number
* </p>
@ -571,12 +571,12 @@ function imap_savebody($imap, $file, int $message_num, string $section = '', int
* argument is a UID</p>
* @return string|false the header of the specified message as a text string.
*/
function imap_fetchheader($imap, int $message_num, int $flags = 0): string|false {}
function imap_fetchheader(Connection $imap, int $message_num, int $flags = 0): string|false {}
/**
* Read the structure of a particular message
* @link https://php.net/manual/en/function.imap-fetchstructure.php
* @param resource $imap
* @param Connection $imap
* @param int $message_num <p>
* The message number
* </p>
@ -586,7 +586,7 @@ function imap_fetchheader($imap, int $message_num, int $flags = 0): string|false
* <i>msg_number</i> argument as a
* UID.
* </p>
* @return object|stdClass|false an object includes the envelope, internal date, size, flags and
* @return stdClass|false an object includes the envelope, internal date, size, flags and
* body structure along with a similar object for each mime attachment. The
* structure of the returned objects is as follows:
* </p>
@ -695,12 +695,12 @@ function imap_fetchheader($imap, int $message_num, int $flags = 0): string|false
* <tr valign="top"><td>5</td><td>OTHER</td></tr>
* </table>
*/
function imap_fetchstructure($imap, int $message_num, int $flags = 0): stdClass|false {}
function imap_fetchstructure(Connection $imap, int $message_num, int $flags = 0): stdClass|false {}
/**
* Clears IMAP cache
* @link https://php.net/manual/en/function.imap-gc.php
* @param resource $imap
* @param Connection $imap
* @param int $flags <p>
* Specifies the cache to purge. It may one or a combination
* of the following constants:
@ -710,20 +710,18 @@ function imap_fetchstructure($imap, int $message_num, int $flags = 0): stdClass|
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_gc($imap, int $flags): bool {}
function imap_gc(Connection $imap, int $flags): bool {}
/**
* Delete all messages marked for deletion
* @link https://php.net/manual/en/function.imap-expunge.php
* @param resource $imap
* @return bool <b>TRUE</b>.
*/
function imap_expunge($imap): bool {}
function imap_expunge(Connection $imap): bool {}
/**
* Mark a message for deletion from current mailbox
* @link https://php.net/manual/en/function.imap-delete.php
* @param resource $imap
* @param Connection $imap
* @param string $message_nums <p>
* The message number
* </p>
@ -734,25 +732,25 @@ function imap_expunge($imap): bool {}
* </p>
* @return bool <b>TRUE</b>.
*/
function imap_delete($imap, string $message_nums, int $flags = 0): bool {}
function imap_delete(Connection $imap, string $message_nums, int $flags = 0): bool {}
/**
* Unmark the message which is marked deleted
* @link https://php.net/manual/en/function.imap-undelete.php
* @param resource $imap
* @param Connection $imap
* @param string $message_nums <p>
* The message number
* </p>
* @param int $flags [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_undelete($imap, string $message_nums, int $flags = 0): bool {}
function imap_undelete(Connection $imap, string $message_nums, int $flags = 0): bool {}
/**
* Check current mailbox
* @link https://php.net/manual/en/function.imap-check.php
* @param resource $imap
* @return object|stdClass|false the information in an object with following properties:
* @param Connection $imap
* @return stdClass|false the information in an object with following properties:
* <b>Date</b> - current system time formatted according to RFC2822
* <b>Driver</b> - protocol used to access this mailbox:
* POP3, IMAP, NNTP
@ -763,12 +761,12 @@ function imap_undelete($imap, string $message_nums, int $flags = 0): bool {}
* <p>
* Returns <b>FALSE</b> on failure.
*/
function imap_check($imap): stdClass|false {}
function imap_check(Connection $imap): stdClass|false {}
/**
* Returns the list of mailboxes that matches the given text
* @link https://php.net/manual/en/function.imap-listscan.php
* @param resource $imap
* @param Connection $imap
* @param string $reference <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>
@ -791,12 +789,12 @@ function imap_check($imap): stdClass|false {}
* @return array|false an array containing the names of the mailboxes that have
* <i>content</i> in the text of the mailbox.
*/
function imap_listscan($imap, string $reference, string $pattern, string $content): array|false {}
function imap_listscan(Connection $imap, string $reference, string $pattern, string $content): array|false {}
/**
* Copy specified messages to a mailbox
* @link https://php.net/manual/en/function.imap-mail-copy.php
* @param resource $imap
* @param Connection $imap
* @param string $message_nums <p>
* <i>msglist</i> is a range not just message
* numbers (as described in RFC2060).
@ -810,12 +808,12 @@ function imap_listscan($imap, string $reference, string $pattern, string $conten
* <b>CP_UID</b> - the sequence numbers contain UIDS</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
function imap_mail_copy(Connection $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
/**
* Move specified messages to a mailbox
* @link https://php.net/manual/en/function.imap-mail-move.php
* @param resource $imap
* @param Connection $imap
* @param string $message_nums <p>
* <i>msglist</i> is a range not just message numbers
* (as described in RFC2060).
@ -829,7 +827,7 @@ function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags
* <b>CP_UID</b> - the sequence numbers contain UIDS</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_mail_move($imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
function imap_mail_move(Connection $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
/**
* Create a MIME message based on given envelope and body sections
@ -856,7 +854,7 @@ function imap_mail_compose(array $envelope, array $bodies): string|false {}
/**
* Create a new mailbox
* @link https://php.net/manual/en/function.imap-createmailbox.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information. Names containing international characters should be
@ -864,12 +862,12 @@ function imap_mail_compose(array $envelope, array $bodies): string|false {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_createmailbox($imap, string $mailbox): bool {}
function imap_createmailbox(Connection $imap, string $mailbox): bool {}
/**
* Rename an old mailbox to new mailbox
* @link https://php.net/manual/en/function.imap-renamemailbox.php
* @param resource $imap
* @param Connection $imap
* @param string $from <p>
* The old mailbox name, see <b>imap_open</b> for more
* information
@ -880,48 +878,48 @@ function imap_createmailbox($imap, string $mailbox): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_renamemailbox($imap, string $from, string $to): bool {}
function imap_renamemailbox(Connection $imap, string $from, string $to): bool {}
/**
* Delete a mailbox
* @link https://php.net/manual/en/function.imap-deletemailbox.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_deletemailbox($imap, string $mailbox): bool {}
function imap_deletemailbox(Connection $imap, string $mailbox): bool {}
/**
* Subscribe to a mailbox
* @link https://php.net/manual/en/function.imap-subscribe.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_subscribe($imap, string $mailbox): bool {}
function imap_subscribe(Connection $imap, string $mailbox): bool {}
/**
* Unsubscribe from a mailbox
* @link https://php.net/manual/en/function.imap-unsubscribe.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_unsubscribe($imap, string $mailbox): bool {}
function imap_unsubscribe(Connection $imap, string $mailbox): bool {}
/**
* Append a string message to a specified mailbox
* @link https://php.net/manual/en/function.imap-append.php
* @param resource $imap
* @param Connection $imap
* @param string $folder <p>
* The mailbox name, see <b>imap_open</b> for more
* information
@ -943,15 +941,15 @@ function imap_unsubscribe($imap, string $mailbox): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_append($imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
function imap_append(Connection $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {}
/**
* Check if the IMAP stream is still active
* @link https://php.net/manual/en/function.imap-ping.php
* @param resource $imap
* @param Connection $imap
* @return bool <b>TRUE</b> if the stream is still alive, <b>FALSE</b> otherwise.
*/
function imap_ping($imap): bool {}
function imap_ping(Connection $imap): bool {}
/**
* Decode BASE64 encoded text
@ -1007,7 +1005,7 @@ function imap_utf8(string $mime_encoded_text): string {}
/**
* Returns status information on a mailbox
* @link https://php.net/manual/en/function.imap-status.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
@ -1016,7 +1014,7 @@ function imap_utf8(string $mime_encoded_text): string {}
* Valid flags are:
* <b>SA_MESSAGES</b> - set $status->messages to the
* number of messages in the mailbox
* @return object This function returns an object containing status information.
* @return stdClass|false This function returns an object containing status information.
* The object has the following properties: messages,
* recent, unseen,
* uidnext, and uidvalidity.
@ -1025,19 +1023,15 @@ function imap_utf8(string $mime_encoded_text): string {}
* flags is also set, which contains a bitmask which can
* be checked against any of the above constants.</p>
*/
function imap_status($imap, string $mailbox, int $flags): object {}
function imap_status(Connection $imap, string $mailbox, int $flags): stdClass|false {}
/**
* @param $stream_id
* @param $options
*/
function imap_status_current($stream_id, $options) {}
/**
* Get information about the current mailbox
* @link https://php.net/manual/en/function.imap-mailboxmsginfo.php
* @param resource $imap
* @return object|stdClass|false the information in an object with following properties:
* @param Connection $imap
* @return stdClass|false the information in an object with following properties:
* <table>
* Mailbox properties
* <tr valign="top">
@ -1077,12 +1071,12 @@ function imap_status_current($stream_id, $options) {}
* <p>
* Returns <b>FALSE</b> on failure.
*/
function imap_mailboxmsginfo($imap): stdClass {}
function imap_mailboxmsginfo(Connection $imap): stdClass {}
/**
* Sets flags on messages
* @link https://php.net/manual/en/function.imap-setflag-full.php
* @param resource $imap
* @param Connection $imap
* @param string $sequence <p>
* A sequence of message numbers. You can enumerate desired messages
* with the X,Y syntax, or retrieve all messages
@ -1100,12 +1094,12 @@ function imap_mailboxmsginfo($imap): stdClass {}
* instead of sequence numbers</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_setflag_full($imap, string $sequence, string $flag, int $options = NIL): bool {}
function imap_setflag_full(Connection $imap, string $sequence, string $flag, int $options = NIL): bool {}
/**
* Clears flags on messages
* @link https://php.net/manual/en/function.imap-clearflag-full.php
* @param resource $imap
* @param Connection $imap
* @param string $sequence <p>
* A sequence of message numbers. You can enumerate desired messages
* with the X,Y syntax, or retrieve all messages
@ -1122,12 +1116,12 @@ function imap_setflag_full($imap, string $sequence, string $flag, int $options =
* instead of sequence numbers</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_clearflag_full($imap, string $sequence, string $flag, int $options = 0): bool {}
function imap_clearflag_full(Connection $imap, string $sequence, string $flag, int $options = 0): bool {}
/**
* Gets and sort messages
* @link https://php.net/manual/en/function.imap-sort.php
* @param resource $imap
* @param Connection $imap
* @param int $criteria <p>
* Criteria can be one (and only one) of the following:
* <b>SORTDATE</b> - message Date</p>
@ -1143,35 +1137,35 @@ function imap_clearflag_full($imap, string $sequence, string $flag, int $options
* @return array|false an array of message numbers sorted by the given
* parameters.
*/
function imap_sort($imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array|false {}
function imap_sort(Connection $imap, int $criteria, bool $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array|false {}
/**
* This function returns the UID for the given message sequence number
* @link https://php.net/manual/en/function.imap-uid.php
* @param resource $imap
* @param Connection $imap
* @param int $message_num <p>
* The message number.
* </p>
* @return int|false The UID of the given message.
*/
function imap_uid($imap, int $message_num): int|false {}
function imap_uid(Connection $imap, int $message_num): int|false {}
/**
* Gets the message sequence number for the given UID
* @link https://php.net/manual/en/function.imap-msgno.php
* @param resource $imap
* @param Connection $imap
* @param int $message_uid <p>
* The message UID
* </p>
* @return int the message sequence number for the given
* <i>uid</i>.
*/
function imap_msgno($imap, int $message_uid): int {}
function imap_msgno(Connection $imap, int $message_uid): int {}
/**
* Read the list of mailboxes
* @link https://php.net/manual/en/function.imap-list.php
* @param resource $imap
* @param Connection $imap
* @param string $reference <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>.
@ -1190,12 +1184,12 @@ function imap_msgno($imap, int $message_uid): int {}
* mailboxes; &#x00027;~/mail/&#37;&#x00027; on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
* @return array|false an array containing the names of the mailboxes.
*/
function imap_list($imap, string $reference, string $pattern): array|false {}
function imap_list(Connection $imap, string $reference, string $pattern): array|false {}
/**
* List all the subscribed mailboxes
* @link https://php.net/manual/en/function.imap-lsub.php
* @param resource $imap
* @param Connection $imap
* @param string $reference <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>
@ -1214,12 +1208,12 @@ function imap_list($imap, string $reference, string $pattern): array|false {}
* mailboxes; &#x00027;~/mail/&#37;&#x00027; on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
* @return array|false an array of all the subscribed mailboxes.
*/
function imap_lsub($imap, string $reference, string $pattern): array|false {}
function imap_lsub(Connection $imap, string $reference, string $pattern): array|false {}
/**
* Read an overview of the information in the headers of the given message
* @link https://php.net/manual/en/function.imap-fetch-overview.php
* @param resource $imap
* @param Connection $imap
* @param string $sequence <p>
* A message sequence description. You can enumerate desired messages
* with the X,Y syntax, or retrieve all messages
@ -1250,7 +1244,7 @@ function imap_lsub($imap, string $reference, string $pattern): array|false {}
* seen - this message is flagged as already read
* draft - this message is flagged as being a draft
*/
function imap_fetch_overview($imap, string $sequence, int $flags = 0): array|false {}
function imap_fetch_overview(Connection $imap, string $sequence, int $flags = 0): array|false {}
/**
* Returns all IMAP alert messages that have occurred
@ -1281,7 +1275,7 @@ function imap_last_error(): string|false {}
/**
* This function returns an array of messages matching the given search criteria
* @link https://php.net/manual/en/function.imap-search.php
* @param resource $imap
* @param Connection $imap
* @param string $criteria <p>
* A string, delimited by spaces, in which the following keywords are
* allowed. Any multi-word arguments (e.g.
@ -1300,7 +1294,7 @@ function imap_last_error(): string|false {}
* <i>criteria</i> or no messages have been found.
* </p>
*/
function imap_search($imap, string $criteria, int $flags = SE_FREE, string $charset = ''): array|false {}
function imap_search(Connection $imap, string $criteria, int $flags = SE_FREE, string $charset = ''): array|false {}
/**
* Decodes a modified UTF-7 encoded string
@ -1349,7 +1343,7 @@ function imap_mime_header_decode(string $string): array|false {}
/**
* Returns a tree of threaded message
* @link https://php.net/manual/en/function.imap-thread.php
* @param resource $imap
* @param Connection $imap
* @param int $flags [optional]
* @return array|false <b>imap_thread</b> returns an associative array containing
* a tree of messages threaded by REFERENCES, or <b>FALSE</b>
@ -1368,7 +1362,7 @@ function imap_mime_header_decode(string $string): array|false {}
* $thread["XX.branch"]
* </p>
*/
function imap_thread($imap, int $flags = SE_FREE): array|false {}
function imap_thread(Connection $imap, int $flags = SE_FREE): array|false {}
/**
* Set or fetch imap timeout
@ -1396,7 +1390,7 @@ function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
/**
* Retrieve the quota level settings, and usage statics per mailbox
* @link https://php.net/manual/en/function.imap-get-quota.php
* @param resource $imap
* @param Connection $imap
* @param string $quota_root <p>
* <i>quota_root</i> should normally be in the form of
* user.name where name is the mailbox you wish to
@ -1420,12 +1414,12 @@ function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
* still available for use, although it is suggested to update.
*/
#[ArrayShape(["usage" => "int", "limit" => "int"])]
function imap_get_quota($imap, string $quota_root): array|false {}
function imap_get_quota(Connection $imap, string $quota_root): array|false {}
/**
* Retrieve the quota settings per user
* @link https://php.net/manual/en/function.imap-get-quotaroot.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* <i>quota_root</i> should normally be in the form of
* which mailbox (i.e. INBOX).
@ -1439,12 +1433,12 @@ function imap_get_quota($imap, string $quota_root): array|false {}
* array of information about the connection upon an un-parsable response
* from the server.
*/
function imap_get_quotaroot($imap, string $mailbox): array|false {}
function imap_get_quotaroot(Connection $imap, string $mailbox): array|false {}
/**
* Sets a quota for a given mailbox
* @link https://php.net/manual/en/function.imap-set-quota.php
* @param resource $imap
* @param Connection $imap
* @param string $quota_root <p>
* The mailbox to have a quota set. This should follow the IMAP standard
* format for a mailbox: user.name.
@ -1454,12 +1448,12 @@ function imap_get_quotaroot($imap, string $mailbox): array|false {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_set_quota($imap, string $quota_root, int $mailbox_size): bool {}
function imap_set_quota(Connection $imap, string $quota_root, int $mailbox_size): bool {}
/**
* Sets the ACL for a given mailbox
* @link https://php.net/manual/en/function.imap-setacl.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
@ -1473,41 +1467,24 @@ function imap_set_quota($imap, string $quota_root, int $mailbox_size): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_setacl($imap, string $mailbox, string $user_id, string $rights): bool {}
function imap_setacl(Connection $imap, string $mailbox, string $user_id, string $rights): bool {}
/**
* Gets the ACL for a given mailbox
* @link https://php.net/manual/en/function.imap-getacl.php
* @param resource $imap
* @param Connection $imap
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return array|false an associative array of "folder" => "acl" pairs.
*/
function imap_getacl($imap, string $mailbox): array|false {}
function imap_getacl(Connection $imap, string $mailbox): array|false {}
/**
* @param $stream_id
* @param $mailbox
*/
function imap_myrights($stream_id, $mailbox) {}
/**
* @param $stream_id
* @param $mailbox
* @param $entry
* @param $attr
* @param $value
*/
function imap_setannotation($stream_id, $mailbox, $entry, $attr, $value) {}
/**
* @param $stream_id
* @param $mailbox
* @param $entry
* @param $attr
*/
function imap_getannotation($stream_id, $mailbox, $entry, $attr) {}
/**
@ -1541,17 +1518,13 @@ function imap_mail(string $to, string $subject, string $message, ?string $additi
/**
* Alias of <b>imap_list</b>
* @link https://php.net/manual/en/function.imap-listmailbox.php
* @param resource $imap
* @param string $reference
* @param string $pattern
* @return array|false
*/
function imap_listmailbox($imap, string $reference, string $pattern): array|false {}
function imap_listmailbox(Connection $imap, string $reference, string $pattern): array|false {}
/**
* Read the list of mailboxes, returning detailed information on each one
* @link https://php.net/manual/en/function.imap-getmailboxes.php
* @param resource $imap
* @param Connection $imap
* @param string $reference <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>
@ -1595,32 +1568,24 @@ function imap_listmailbox($imap, string $reference, string $pattern): array|fals
* provided, you can assume the IMAP server supports this feature for this mailbox.
* </p>
*/
function imap_getmailboxes($imap, string $reference, string $pattern): array|false {}
function imap_getmailboxes(Connection $imap, string $reference, string $pattern): array|false {}
/**
* Alias of <b>imap_listscan</b>
* @link https://php.net/manual/en/function.imap-scanmailbox.php
* @param $imap
* @param $reference
* @param $pattern
* @param $content
*/
function imap_scanmailbox($imap, string $reference, string $pattern, string $content): array|false {}
function imap_scanmailbox(Connection $imap, string $reference, string $pattern, string $content): array|false {}
/**
* Alias of <b>imap_lsub</b>
* @link https://php.net/manual/en/function.imap-listsubscribed.php
* @param resource $imap
* @param string $reference
* @param string $pattern
* @return array|false
*/
function imap_listsubscribed($imap, string $reference, string $pattern): array|false {}
function imap_listsubscribed(Connection $imap, string $reference, string $pattern): array|false {}
/**
* List all the subscribed mailboxes
* @link https://php.net/manual/en/function.imap-getsubscribed.php
* @param resource $imap
* @param Connection $imap
* @param string $reference <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>
@ -1653,12 +1618,12 @@ function imap_listsubscribed($imap, string $reference, string $pattern): array|f
* <b>LATT_UNMARKED</b> - This mailbox is not marked.
* Only used by UW-IMAPD.
*/
function imap_getsubscribed($imap, string $reference, string $pattern): array|false {}
function imap_getsubscribed(Connection $imap, string $reference, string $pattern): array|false {}
/**
* (PHP 4, PHP 5)<br/>
* Alias of imap_body()
* @param resource $imap An IMAP stream returned by imap_open()
* @param Connection $imap An IMAP stream returned by imap_open()
* @param int $message_num message number
* @param int $flags [optional] A bitmask with one or more of the following:<ul>
* <li>FT_UID - The msg_number is a UID
@ -1666,34 +1631,25 @@ function imap_getsubscribed($imap, string $reference, string $pattern): array|fa
* <li>FT_INTERNAL - The return string is in internal format, will not canonicalize to CRLF.</ul><p>
* @return string|false body of the specified message
*/
function imap_fetchtext($imap, int $message_num, int $flags = 0): string|false {}
function imap_fetchtext(Connection $imap, int $message_num, int $flags = 0): string|false {}
/**
* Alias of <b>imap_listscan</b>
* @link https://php.net/manual/en/function.imap-scan.php
* @param $imap
* @param $reference
* @param $pattern
* @param $content
*/
function imap_scan($imap, string $reference, string $pattern, string $content): array|false {}
function imap_scan(Connection $imap, string $reference, string $pattern, string $content): array|false {}
/**
* Alias of <b>imap_createmailbox</b>
* @link https://php.net/manual/en/function.imap-create.php
* @param $imap
* @param $mailbox
*/
function imap_create($imap, string $mailbox): bool {}
function imap_create(Connection $imap, string $mailbox): bool {}
/**
* Alias of <b>imap_renamemailbox</b>
* @link https://php.net/manual/en/function.imap-rename.php
* @param $imap
* @param $from
* @param $to
*/
function imap_rename($imap, string $from, string $to): bool {}
function imap_rename(Connection $imap, string $from, string $to): bool {}
/**
* Decode a modified UTF-7 string to UTF-8

View File

@ -0,0 +1,12 @@
<?php
/**
* @since 8.1
*/
class IntlDatePatternGenerator
{
public function __construct(?string $locale = null) {}
public static function create(?string $locale = null): ?IntlDatePatternGenerator {}
public function getBestPattern(string $skeleton): string|false {}
}

View File

@ -1354,7 +1354,7 @@ function msgfmt_get_error_message(MessageFormatter $formatter): string {}
* @return IntlDateFormatter|null
*/
#[Pure]
function datefmt_create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, string|null $pattern = null): ?IntlDateFormatter {}
function datefmt_create(?string $locale, int $dateType = 0, int $timeType = 0, $timezone = null, IntlCalendar|int|null $calendar = null, string|null $pattern = null): ?IntlDateFormatter {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/>
@ -5142,7 +5142,7 @@ class IntlDateFormatter
* @param string $pattern [optional]
*/
#[Pure]
public function __construct(string|null $locale, int $dateType, int $timeType, $timezone = null, $calendar = null, string|null $pattern = '') {}
public function __construct(string|null $locale, int $dateType = 0, int $timeType = 0, $timezone = null, $calendar = null, string|null $pattern = '') {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/>
@ -5180,7 +5180,7 @@ class IntlDateFormatter
* @return IntlDateFormatter
*/
#[TentativeType]
public static function create(string|null $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, string|null $pattern = ''): ?IntlDateFormatter {}
public static function create(string|null $locale, int $dateType = 0, int $timeType = 0, $timezone = null, IntlCalendar|int|null $calendar = null, string|null $pattern = ''): ?IntlDateFormatter {}
/**
* (PHP 5 >= 5.5.0, PECL intl >= 3.0.0)<br/>
@ -5579,7 +5579,7 @@ class Transliterator
/**
* Starting 8.2 $id is readonly to unlock subclassing it
*/
public $id;
public string $id;
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
@ -7395,6 +7395,12 @@ class IntlPartsIterator extends IntlIterator implements Iterator
#[Pure]
#[TentativeType]
public function getBreakIterator(): IntlBreakIterator {}
/**
* @since 8.1
*/
#[TentativeType]
public function getRuleStatus(): int {}
}
class IntlCodePointBreakIterator extends IntlBreakIterator implements Traversable

View File

@ -215,6 +215,11 @@ define('JSON_ERROR_UTF16', 10);
*/
define('JSON_THROW_ON_ERROR', 4194304);
/**
* @since 8.1
*/
define('JSON_ERROR_NON_BACKED_ENUM', 11);
/**
* (PHP 5 >= 5.2.0, PECL json >= 1.2.0)<br/>
* Returns the JSON representation of a value

8
ldap/Connection.php Normal file
View File

@ -0,0 +1,8 @@
<?php
namespace LDAP;
/**
* @since 8.1
*/
final class Connection {}

8
ldap/Result.php Normal file
View File

@ -0,0 +1,8 @@
<?php
namespace LDAP;
/**
* @since 8.1
*/
final class Result {}

8
ldap/ResultEntry.php Normal file
View File

@ -0,0 +1,8 @@
<?php
namespace LDAP;
/**
* @since 8.1
*/
final class ResultEntry {}

View File

@ -1,7 +1,9 @@
<?php
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use LDAP\Connection;
use LDAP\Result;
use LDAP\ResultEntry;
define('LDAP_ESCAPE_FILTER', 1);
@ -400,7 +402,7 @@ define('LDAP_CONTROL_AUTHZID_RESPONSE', "2.16.840.1.113730.3.4.15");
* @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 = '', &$controls = null): string|bool {}
function ldap_exop_passwd(Connection $ldap, string $user = '', string $old_password = '', string $new_password = '', &$controls = null): string|bool {}
/**
* Refresh extended operation helper
@ -411,7 +413,7 @@ function ldap_exop_passwd($ldap, string $user = '', string $old_password = '', s
* @return int|false From RFC: The responseTtl field is the time in seconds which the server chooses to have as the time-to-live field for that entry. It must not be any smaller than that which the client requested, and it may be larger. However, to allow servers to maintain a relatively accurate directory, and to prevent clients from abusing the dynamic extensions, servers are permitted to shorten a client-requested time-to-live value, down to a minimum of 86400 seconds (one day). FALSE will be returned on error.
* @since 7.3
*/
function ldap_exop_refresh($ldap, string $dn, int $ttl): int|false {}
function ldap_exop_refresh(Connection $ldap, string $dn, int $ttl): int|false {}
/**
* WHOAMI extended operation helper
@ -420,7 +422,7 @@ function ldap_exop_refresh($ldap, string $dn, int $ttl): int|false {}
* @return string|false The data returned by the server, or FALSE on error.
* @since 7.2
*/
function ldap_exop_whoami($ldap): string|false {}
function ldap_exop_whoami(Connection $ldap): string|false {}
/**
* Performs an extended operation on the specified link with reqoid the OID of the operation and reqdata the data.
@ -431,10 +433,10 @@ function ldap_exop_whoami($ldap): string|false {}
* @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.
* @return Result|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, null|array $controls = null, &$response_data, &$response_oid) {}
function ldap_exop(Connection $ldap, string $request_oid, ?string $request_data, null|array $controls = null, &$response_data, &$response_oid): Result|bool {}
/**
* Parse LDAP extended operation data from result object result
@ -446,7 +448,7 @@ function ldap_exop($ldap, string $request_oid, ?string $request_data, null|array
* @return bool Returns TRUE on success or FALSE on failure.
* @since 7.2
*/
function ldap_parse_exop($ldap, $result, &$response_data = null, &$response_oid = null): bool {}
function ldap_parse_exop(Connection $ldap, Result $result, &$response_data = null, &$response_oid = null): bool {}
/**
* Translate 8859 characters to t61 characters
@ -476,7 +478,7 @@ function ldap_t61_to_8859(string $value): string {}
* @param int $port [optional] <p>
* The port to connect to. Not used when using URLs.
* </p>
* @return resource|false a positive LDAP link identifier on success, or <b>FALSE</b> on error.
* @return Connection|false a positive LDAP link identifier on success, or <b>FALSE</b> on error.
* When OpenLDAP 2.x.x is used, <b>ldap_connect</b> will always
* return a resource as it does not actually connect but just
* initializes the connecting parameters. The actual connect happens with
@ -487,47 +489,47 @@ function ldap_t61_to_8859(string $value): string {}
* If no arguments are specified then the link identifier of the already
* opened link will be returned.
*/
function ldap_connect(?string $uri, int $port = 389) {}
function ldap_connect(?string $uri, int $port = 389): Connection|false {}
/**
* Alias of <b>ldap_unbind</b>
* @link https://php.net/manual/en/function.ldap-close.php
* @param resource $ldap
* @param Connection $ldap
* @return bool
*/
function ldap_close($ldap): bool {}
function ldap_close(Connection $ldap): bool {}
/**
* Bind to LDAP directory
* @link https://php.net/manual/en/function.ldap-bind.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string|null $dn [optional]
* @param string|null $password [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_bind($ldap, ?string $dn, ?string $password): bool {}
function ldap_bind(Connection $ldap, ?string $dn, ?string $password): bool {}
/**
* Bind to LDAP directory
* Does the same thing as ldap_bind() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-bind.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string|null $dn [optional]
* @param string|null $password [optional]
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false
* @return Result|false
* @since 7.3
*/
function ldap_bind_ext($ldap, ?string $dn, ?string $password, null|array $controls = null) {}
function ldap_bind_ext(Connection $ldap, ?string $dn, ?string $password, null|array $controls = null): Result|false {}
/**
* Bind to LDAP directory using SASL
* @link https://php.net/manual/en/function.ldap-sasl-bind.php
* @param resource $ldap
* @param Connection $ldap
* @param string $binddn [optional]
* @param string $password [optional]
* @param string $sasl_mech [optional]
@ -537,17 +539,17 @@ function ldap_bind_ext($ldap, ?string $dn, ?string $password, null|array $contro
* @param string $props [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_sasl_bind($ldap, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null): bool {}
function ldap_sasl_bind(Connection $ldap, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null): bool {}
/**
* Unbind from LDAP directory
* @link https://php.net/manual/en/function.ldap-unbind.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_unbind($ldap): bool {}
function ldap_unbind(Connection $ldap): bool {}
/**
* Read an entry
@ -609,9 +611,9 @@ function ldap_unbind($ldap): bool {}
* <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
* dereferenced.</p>
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false a search result identifier or <b>FALSE</b> on error.
* @return Result|array|false a search result identifier or <b>FALSE</b> on error.
*/
function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = 0, null|array $controls = null) {}
function ldap_read($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = 0, null|array $controls = null): Result|array|false {}
/**
* Single-level search
@ -667,9 +669,9 @@ function ldap_read($ldap, array|string $base, array|string $filter, array $attri
* <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
* dereferenced.</p>
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false a search result identifier or <b>FALSE</b> on error.
* @return Result|array|false a search result identifier or <b>FALSE</b> on error.
*/
function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = 0, null|array $controls = null) {}
function ldap_list($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = 0, null|array $controls = null): Result|array|false {}
/**
* Search LDAP tree
@ -729,9 +731,9 @@ function ldap_list($ldap, array|string $base, array|string $filter, array $attri
* <b>LDAP_DEREF_NEVER</b> - (default) aliases are never
* dereferenced.</p>
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false a search result identifier or <b>FALSE</b> on error.
* @return Result|array|false a search result identifier or <b>FALSE</b> on error.
*/
function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = 0, null|array $controls = null) {}
function ldap_search($ldap, array|string $base, array|string $filter, array $attributes = [], int $attributes_only = 0, int $sizelimit = -1, int $timelimit = -1, int $deref = 0, null|array $controls = null): Result|array|false {}
/**
* Free result memory
@ -739,53 +741,53 @@ function ldap_search($ldap, array|string $base, array|string $filter, array $att
* @param resource|Result $result
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_free_result($ldap): bool {}
function ldap_free_result(Result $result): bool {}
/**
* Count the number of entries in a search
* @link https://php.net/manual/en/function.ldap-count-entries.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $result <p>
* @param Result $result <p>
* The internal LDAP result.
* </p>
* @return int|false number of entries in the result or <b>FALSE</b> on error.
* @return int number of entries in the result or <b>FALSE</b> on error.
*/
function ldap_count_entries($ldap, $result): int {}
function ldap_count_entries(Connection $ldap, Result $result): int {}
/**
* Return first result id
* @link https://php.net/manual/en/function.ldap-first-entry.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $result
* @return resource|false the result entry identifier for the first entry on success and
* @param Result $result
* @return ResultEntry|false the result entry identifier for the first entry on success and
* <b>FALSE</b> on error.
*/
function ldap_first_entry($ldap, $result) {}
function ldap_first_entry(Connection $ldap, Result $result): ResultEntry|false {}
/**
* Get next result entry
* @link https://php.net/manual/en/function.ldap-next-entry.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $entry
* @return resource|false entry identifier for the next entry in the result whose entries
* @param ResultEntry $entry
* @return ResultEntry|false entry identifier for the next entry in the result whose entries
* are being read starting with <b>ldap_first_entry</b>. If
* there are no more entries in the result then it returns <b>FALSE</b>.
*/
function ldap_next_entry($ldap, $entry) {}
function ldap_next_entry(Connection $ldap, ResultEntry $entry): ResultEntry|false {}
/**
* Get all result entries
* @link https://php.net/manual/en/function.ldap-get-entries.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $result
* @param Result $result
* @return array|false a complete result information in a multi-dimensional array on
* success and <b>FALSE</b> on error.
* </p>
@ -805,51 +807,51 @@ function ldap_next_entry($ldap, $entry) {}
* return_value[i]["attribute"][j] = jth value of attribute in ith entry
* </pre>
*/
function ldap_get_entries($ldap, $result): array|false {}
function ldap_get_entries(Connection $ldap, Result $result): array|false {}
/**
* Return first attribute
* @link https://php.net/manual/en/function.ldap-first-attribute.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $entry
* @param ResultEntry $entry
* @return string|false the first attribute in the entry on success and <b>FALSE</b> on
* error.
*/
function ldap_first_attribute($ldap, $entry): string|false {}
function ldap_first_attribute(Connection $ldap, ResultEntry $entry): string|false {}
/**
* Get the next attribute in result
* @link https://php.net/manual/en/function.ldap-next-attribute.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $entry
* @param ResultEntry $entry
* @return string|false the next attribute in an entry on success and <b>FALSE</b> on
* error.
*/
function ldap_next_attribute($ldap, $entry): string|false {}
function ldap_next_attribute(Connection $ldap, ResultEntry $entry): string|false {}
/**
* Get attributes from a search result entry
* @link https://php.net/manual/en/function.ldap-get-attributes.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $entry
* @param ResultEntry $entry
* @return array a complete entry information in a multi-dimensional array
* on success and <b>FALSE</b> on error.
*/
function ldap_get_attributes($ldap, $entry): array {}
function ldap_get_attributes(Connection $ldap, ResultEntry $entry): array {}
/**
* Get all values from a result entry
* @link https://php.net/manual/en/function.ldap-get-values.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $entry
* @param ResultEntry $entry
* @param string $attribute
* @return array|false an array of values for the attribute on success and <b>FALSE</b> on
* error. The number of values can be found by indexing "count" in the
@ -864,33 +866,33 @@ function ldap_get_attributes($ldap, $entry): array {}
* return_value[0] = first value of attribute
* return_value[i] = ith value of attribute
*/
function ldap_get_values($ldap, $entry, string $attribute): array|false {}
function ldap_get_values(Connection $ldap, ResultEntry $entry, string $attribute): array|false {}
/**
* Get all binary values from a result entry
* @link https://php.net/manual/en/function.ldap-get-values-len.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $entry
* @param ResultEntry $entry
* @param string $attribute
* @return array|false an array of values for the attribute on success and <b>FALSE</b> on
* error. Individual values are accessed by integer index in the array. The
* first index is 0. The number of values can be found by indexing "count"
* in the resultant array.
*/
function ldap_get_values_len($ldap, $entry, string $attribute): array|false {}
function ldap_get_values_len(Connection $ldap, ResultEntry $entry, string $attribute): array|false {}
/**
* Get the DN of a result entry
* @link https://php.net/manual/en/function.ldap-get-dn.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $entry
* @param ResultEntry $entry
* @return string|false the DN of the result entry and <b>FALSE</b> on error.
*/
function ldap_get_dn($ldap, $entry): string|false {}
function ldap_get_dn(Connection $ldap, ResultEntry $entry): string|false {}
/**
* Splits DN into its component parts
@ -945,13 +947,13 @@ function ldap_dn2ufn(string $dn): string|false {}
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_add($ldap, string $dn, array $entry, null|array $controls = null): bool {}
function ldap_add(Connection $ldap, string $dn, array $entry, null|array $controls = null): bool {}
/**
* Add entries to LDAP directory
* Does the same thing as ldap_add() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://www.php.net/manual/en/function.ldap-add-ext.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -969,15 +971,15 @@ function ldap_add($ldap, string $dn, array $entry, null|array $controls = null):
* </code>
* </p>
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false
* @return Result|false
* @since 7.3
*/
function ldap_add_ext($ldap, string $dn, array $entry, null|array $controls = null) {}
function ldap_add_ext(Connection $ldap, string $dn, array $entry, null|array $controls = null): Result|false {}
/**
* Delete an entry from a directory
* @link https://php.net/manual/en/function.ldap-delete.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -986,29 +988,29 @@ function ldap_add_ext($ldap, string $dn, array $entry, null|array $controls = nu
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_delete($ldap, string $dn, null|array $controls = null): bool {}
function ldap_delete(Connection $ldap, string $dn, null|array $controls = null): bool {}
/**
* Delete an entry from a directory
* Does the same thing as ldap_delete() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-delete-ext.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
* The distinguished name of an LDAP entity.
* </p>
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false
* @return Result|false
* @since 7.3
*/
function ldap_delete_ext($ldap, string $dn, null|array $controls = null) {}
function ldap_delete_ext(Connection $ldap, string $dn, null|array $controls = null): Result|false {}
/**
* This function is an alias of: ldap_mod_replace().
* Replace attribute values with new ones
* @link https://www.php.net/manual/en/function.ldap-modify.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1018,12 +1020,12 @@ function ldap_delete_ext($ldap, string $dn, null|array $controls = null) {}
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_modify($ldap, string $dn, array $entry, null|array $controls = null): bool {}
function ldap_modify(Connection $ldap, string $dn, array $entry, null|array $controls = null): bool {}
/**
* Add attribute values to current attributes
* @link https://php.net/manual/en/function.ldap-mod-add.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1033,13 +1035,13 @@ function ldap_modify($ldap, string $dn, array $entry, null|array $controls = nul
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_mod_add($ldap, string $dn, array $entry, null|array $controls = null): bool {}
function ldap_mod_add(Connection $ldap, string $dn, array $entry, null|array $controls = null): bool {}
/**
* Add attribute values to current attributes
* Does the same thing as ldap_mod_add() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-mod-add-ext.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1047,15 +1049,15 @@ function ldap_mod_add($ldap, string $dn, array $entry, null|array $controls = nu
* </p>
* @param array $entry
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false
* @return Result|false
* @since 7.3
*/
function ldap_mod_add_ext($ldap, string $dn, array $entry, null|array $controls = null) {}
function ldap_mod_add_ext(Connection $ldap, string $dn, array $entry, null|array $controls = null): Result|false {}
/**
* Replace attribute values with new ones
* @link https://php.net/manual/en/function.ldap-mod-replace.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1065,13 +1067,13 @@ function ldap_mod_add_ext($ldap, string $dn, array $entry, null|array $controls
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_mod_replace($ldap, string $dn, array $entry, null|array $controls = null): bool {}
function ldap_mod_replace(Connection $ldap, string $dn, array $entry, null|array $controls = null): bool {}
/**
* Replace attribute values with new ones
* Does the same thing as ldap_mod_replace() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-mod-replace-ext.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1079,15 +1081,15 @@ function ldap_mod_replace($ldap, string $dn, array $entry, null|array $controls
* </p>
* @param array $entry
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false
* @return Result|false
* @since 7.3
*/
function ldap_mod_replace_ext($ldap, string $dn, array $entry, null|array $controls = null) {}
function ldap_mod_replace_ext(Connection $ldap, string $dn, array $entry, null|array $controls = null): Result|false {}
/**
* Delete attribute values from current attributes
* @link https://php.net/manual/en/function.ldap-mod-del.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1097,13 +1099,13 @@ function ldap_mod_replace_ext($ldap, string $dn, array $entry, null|array $contr
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_mod_del($ldap, string $dn, array $entry, null|array $controls = null): bool {}
function ldap_mod_del(Connection $ldap, string $dn, array $entry, null|array $controls = null): bool {}
/**
* Delete attribute values from current attributes
* Does the same thing as ldap_mod_del() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-mod-del-ext.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1111,21 +1113,21 @@ function ldap_mod_del($ldap, string $dn, array $entry, null|array $controls = nu
* </p>
* @param array $entry
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false
* @return Result|false
* @since 7.3
*/
function ldap_mod_del_ext($ldap, string $dn, array $entry, null|array $controls = null) {}
function ldap_mod_del_ext(Connection $ldap, string $dn, array $entry, null|array $controls = null): Result|false {}
/**
* Return the LDAP error number of the last LDAP command
* @link https://php.net/manual/en/function.ldap-errno.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @return int Return the LDAP error number of the last LDAP command for this
* link.
*/
function ldap_errno($ldap): int {}
function ldap_errno(Connection $ldap): int {}
/**
* Convert LDAP error number into string error message
@ -1140,17 +1142,17 @@ function ldap_err2str(int $errno): string {}
/**
* Return the LDAP error message of the last LDAP command
* @link https://php.net/manual/en/function.ldap-error.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @return string string error message.
*/
function ldap_error($ldap): string {}
function ldap_error(Connection $ldap): string {}
/**
* Compare value of attribute found in entry specified with DN
* @link https://php.net/manual/en/function.ldap-compare.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1166,31 +1168,12 @@ function ldap_error($ldap): string {}
* @return int|bool <b>TRUE</b> if <i>value</i> matches otherwise returns
* <b>FALSE</b>. Returns -1 on error.
*/
function ldap_compare($ldap, string $dn, string $attribute, string $value, null|array $controls = null): int|bool {}
/**
* Sort LDAP result entries
* @link https://php.net/manual/en/function.ldap-sort.php
* @param resource $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $result <p>
* An search result identifier, returned by
* <b>ldap_search</b>.
* </p>
* @param string $sortfilter <p>
* The attribute to use as a key in the sort.
* </p>
* @removed 8.0
* @return bool
*/
#[Deprecated(since: "7.0")]
function ldap_sort($ldap, $result, string $sortfilter): bool {}
function ldap_compare(Connection $ldap, string $dn, string $attribute, string $value, null|array $controls = null): int|bool {}
/**
* Modify the name of an entry
* @link https://php.net/manual/en/function.ldap-rename.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1209,13 +1192,13 @@ function ldap_sort($ldap, $result, string $sortfilter): bool {}
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, null|array $controls = null): bool {}
function ldap_rename(Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, null|array $controls = null): bool {}
/**
* Modify the name of an entry
* Does the same thing as ldap_rename() but returns the LDAP result resource to be parsed with ldap_parse_result().
* @link https://php.net/manual/en/function.ldap-rename-ext.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param string $dn <p>
@ -1232,15 +1215,15 @@ function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, boo
* is retained as non-distinguished values of the entry.
* </p>
* @param array|null $controls Array of LDAP Controls to send with the request.
* @return resource|false
* @return Result|false
* @since 7.3
*/
function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, null|array $controls = null) {}
function ldap_rename_ext(Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, null|array $controls = null): Result|false {}
/**
* Get the current value for given option
* @link https://php.net/manual/en/function.ldap-get-option.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param int $option <p>
@ -1307,12 +1290,12 @@ function ldap_rename_ext($ldap, string $dn, string $new_rdn, string $new_parent,
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_get_option($ldap, int $option, &$value = null): bool {}
function ldap_get_option(Connection $ldap, int $option, &$value = null): bool {}
/**
* Set the value of the given option
* @link https://php.net/manual/en/function.ldap-set-option.php
* @param resource $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param int $option <p>
@ -1408,41 +1391,41 @@ function ldap_get_option($ldap, int $option, &$value = null): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ldap_set_option($ldap, int $option, $value): bool {}
function ldap_set_option(Connection|null $ldap, int $option, $value): bool {}
/**
* Return first reference
* @link https://php.net/manual/en/function.ldap-first-reference.php
* @param resource $ldap
* @param resource $result
* @return resource
* @param Connection $ldap
* @param Result $result
* @return ResultEntry|false
*/
function ldap_first_reference($ldap, $result) {}
function ldap_first_reference(Connection $ldap, Result $result): ResultEntry|false {}
/**
* Get next reference
* @link https://php.net/manual/en/function.ldap-next-reference.php
* @param resource $ldap
* @param resource $entry
* @return resource
* @param Connection $ldap
* @param ResultEntry $entry
* @return ResultEntry|false
*/
function ldap_next_reference($ldap, $entry) {}
function ldap_next_reference(Connection $ldap, ResultEntry $entry): ResultEntry|false {}
/**
* Extract information from reference entry
* @link https://php.net/manual/en/function.ldap-parse-reference.php
* @param resource $ldap
* @param resource $entry
* @param Connection $ldap
* @param ResultEntry $entry
* @param array &$referrals
* @return bool
*/
function ldap_parse_reference($ldap, $entry, &$referrals): bool {}
function ldap_parse_reference(Connection $ldap, ResultEntry $entry, &$referrals): bool {}
/**
* Extract information from result
* @link https://php.net/manual/en/function.ldap-parse-result.php
* @param resource $ldap
* @param resource $result
* @param Connection $ldap
* @param Result $result
* @param int &$error_code
* @param string &$matched_dn [optional]
* @param string &$error_message [optional]
@ -1450,69 +1433,24 @@ function ldap_parse_reference($ldap, $entry, &$referrals): bool {}
* @param array &$controls An array of LDAP Controls which have been sent with the response.
* @return bool
*/
function ldap_parse_result($ldap, $result, &$error_code, &$matched_dn, &$error_message, &$referrals, &$controls = null): bool {}
function ldap_parse_result(Connection $ldap, Result $result, &$error_code, &$matched_dn, &$error_message, &$referrals, &$controls = null): bool {}
/**
* Start TLS
* @link https://php.net/manual/en/function.ldap-start-tls.php
* @param resource $ldap
* @param Connection $ldap
* @return bool
*/
function ldap_start_tls($ldap): bool {}
function ldap_start_tls(Connection $ldap): bool {}
/**
* Set a callback function to do re-binds on referral chasing
* @link https://php.net/manual/en/function.ldap-set-rebind-proc.php
* @param resource $ldap
* @param Connection $ldap
* @param callable|null $callback
* @return bool
*/
function ldap_set_rebind_proc($ldap, ?callable $callback): bool {}
/**
* Send LDAP pagination control
* @link https://php.net/manual/en/function.ldap-control-paged-result.php
* @param resource $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param int $pagesize <p>
* The number of entries by page.
* </p>
* @param bool $iscritical [optional] <p>
* Indicates whether the pagination is critical of not.
* If true and if the server doesn't support pagination, the search
* will return no result.
* </p>
* @param string $cookie [optional] <p>
* An opaque structure sent by the server
* (<b>ldap_control_paged_result_response</b>).
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4
* @removed 8.0
*/
#[Deprecated(since: "7.4")]
function ldap_control_paged_result($ldap, int $pagesize, $iscritical = false, $cookie = ''): bool {}
/**
* Retrieve the LDAP pagination cookie
* @link https://php.net/manual/en/function.ldap-control-paged-result-response.php
* @param resource $ldap <p>
* An LDAP link identifier, returned by <b>ldap_connect</b>.
* </p>
* @param resource $result
* @param string &$cookie [optional] <p>
* An opaque structure sent by the server.
* </p>
* @param int &$estimated [optional] <p>
* The estimated number of entries to retrieve.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4
* @removed 8.0
*/
#[Deprecated(since: "7.4")]
function ldap_control_paged_result_response($ldap, $result, &$cookie = null, &$estimated = null): bool {}
function ldap_set_rebind_proc(Connection $ldap, ?callable $callback): bool {}
/**
* Escape a string for use in an LDAP filter or DN
@ -1528,7 +1466,7 @@ function ldap_escape(string $value, string $ignore = '', int $flags = 0): string
* (PHP 5.4 >= 5.4.26, PHP 5.5 >= 5.5.10, PHP 5.6 >= 5.6.0)
* Batch and execute modifications on an LDAP entry
* @link https://php.net/manual/en/function.ldap-modify-batch.php
* @param $ldap <p>
* @param Connection $ldap <p>
* An LDAP link identifier, returned by
* {@see ldap_connect()}.
* </p>
@ -1597,12 +1535,12 @@ function ldap_escape(string $value, string $ignore = '', int $flags = 0): string
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4
*/
function ldap_modify_batch($ldap, string $dn, array $modifications_info, null|array $controls = null): bool {}
function ldap_modify_batch(Connection $ldap, string $dn, array $modifications_info, null|array $controls = null): bool {}
/**
* @param resource $ldap
* @param resource $result
* @param Connection $ldap
* @param Result $result
* @return int returns the number of reference messages in a search result.
* @since 8.0
*/
function ldap_count_references($ldap, $result): int {}
function ldap_count_references(Connection $ldap, Result $result): int {}

View File

@ -1,12 +1,13 @@
<?php
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;
/**
* libxml version like 20605 or 20617
* @link https://php.net/manual/en/libxml.constants.php
*/
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;
define('LIBXML_VERSION', 20901);
/**

View File

@ -1,12 +1,13 @@
<?php
/**
* @removed 8.0
*/
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;
/**
* @removed 8.0
*/
define('MB_OVERLOAD_MAIL', 1);
/**
@ -652,7 +653,7 @@ function mb_list_encodings(): array {}
/**
* Get aliases of a known encoding type
* @param string $encoding The encoding type being checked, for aliases.
* @return string[] a numerically indexed array of encoding aliases on success
* @return string[]|false a numerically indexed array of encoding aliases on success, or FALSE on failure
* @link https://php.net/manual/en/function.mb-encoding-aliases.php
*/
#[Pure]
@ -873,7 +874,10 @@ function mb_encode_numericentity(string $string, array $map, ?string $encoding =
* the code area to convert.
* </p>
* @param null|string $encoding
* @return string The converted string.
* @param bool $is_hex [optional] <p>
* this parameter is not used.
* </p>
* @return string|false|null The converted string.
*/
#[Pure]
function mb_decode_numericentity(string $string, array $map, ?string $encoding = null): string {}
@ -996,7 +1000,7 @@ function mb_ereg(string $pattern, string $string, &$matches): bool {}
* @param string[] &$matches [optional] <p>
* Contains a substring of the matched string.
* </p>
* @return bool
* @return bool|int
*/
function mb_eregi(string $pattern, string $string, &$matches): bool {}
@ -1376,7 +1380,7 @@ function mb_ord(string $string, ?string $encoding): int|false {}
* @link https://www.php.net/manual/en/function.mb-scrub.php
* @param string $string
* @param string|null $encoding [optional]
* @return string
* @return string|false
* @since 7.2
*/
#[Pure]
@ -1402,7 +1406,7 @@ function mbereg_search_setpos($position) {}
* Character encoding name to use.
* If it is omitted, internal character encoding is used.
* </p>
* @return string[]
* @return string[]|false
* @since 7.4
*/
#[Pure]

View File

@ -1,11 +1,12 @@
<?php
use JetBrains\PhpStorm\Deprecated;
/**
* @deprecated 7.1
* @removed 7.2
*/
use JetBrains\PhpStorm\Deprecated;
define('MCRYPT_ENCRYPT', 0);
/**

View File

@ -1,7 +1,5 @@
<?php
use JetBrains\PhpStorm\Deprecated;
/**
* Columns are returned into the array having the fieldname as the array
* index.
@ -9,6 +7,9 @@ use JetBrains\PhpStorm\Deprecated;
* @deprecated 5.5
* @removed 7.0
*/
use JetBrains\PhpStorm\Deprecated;
define('MYSQL_ASSOC', 1);
/**

View File

@ -1,9 +1,5 @@
<?php
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\TentativeType;
/**
* <p>
* Read options from the named group from my.cnf
@ -11,6 +7,11 @@ use JetBrains\PhpStorm\Internal\TentativeType;
* </p>
* @link https://php.net/manual/en/mysqli.constants.php
*/
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Internal\TentativeType;
define('MYSQLI_READ_DEFAULT_GROUP', 5);
/**
@ -689,6 +690,11 @@ define('MYSQLI_OPT_LOAD_DATA_LOCAL_DIR', 43);
define('MYSQLI_REFRESH_REPLICA', 64);
/**
* @since 8.1
*/
define('MYSQLI_IS_MARIADB', 0);
/**
* Gets the number of affected rows in a previous MySQL operation
* @link https://secure.php.net/manual/en/mysqli.affected-rows.php
@ -854,7 +860,7 @@ function mysqli_error(mysqli $mysql): string {}
* as there are bound parameters in the SQL statement being executed. Each value is treated as a string.
* @return bool true on success or false on failure.
*/
function mysqli_stmt_execute(mysqli_stmt $statement): bool {}
function mysqli_stmt_execute(mysqli_stmt $statement, ?array $params = null): bool {}
/**
* Executes a prepared statement
@ -866,7 +872,7 @@ function mysqli_stmt_execute(mysqli_stmt $statement): bool {}
* @return bool
*/
#[Deprecated(since: "5.3")]
function mysqli_execute(mysqli_stmt $statement): bool {}
function mysqli_execute(mysqli_stmt $statement, ?array $params = null): bool {}
/**
* Returns the next field in the result set
@ -963,6 +969,20 @@ function mysqli_fetch_object(mysqli_result $result, string $class = 'stdClass',
*/
function mysqli_fetch_row(mysqli_result $result): array|false|null {}
/**
* Fetch a single column from the next row of a result set
* @link https://php.net/manual/en/mysqli-result.fetch-column.php
* @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
* mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
* @param int $column [optional] <p>
* 0-indexed number of the column you wish to retrieve from the row.
* If no value is supplied, the first column will be returned.
* </p>
* @return string|int|float|false|null a single column from
* the next row of a result set or false if there are no more rows.
*/
function mysqli_fetch_column(mysqli_result $result, int $column = 0): string|int|float|false|null {}
/**
* Returns the number of columns for the most recent query
* @link https://php.net/manual/en/mysqli.field-count.php
@ -1421,7 +1441,7 @@ function mysqli_stmt_affected_rows(mysqli_stmt $statement): string|int {}
* @link https://php.net/manual/en/mysqli-stmt.attr-get.php
* @param mysqli_stmt $statement
* @param int $attribute
* @return int returns the value of the attribute.
* @return int|false Returns FALSE if the attribute is not found, otherwise returns the value of the attribute.
*/
function mysqli_stmt_attr_get(mysqli_stmt $statement, int $attribute): int {}
@ -1838,7 +1858,7 @@ final class mysqli_sql_exception extends RuntimeException
*
* @var string
*/
protected $sqlstate;
protected string $sqlstate;
/**
* The error code
@ -1846,6 +1866,11 @@ final class mysqli_sql_exception extends RuntimeException
* @var int
*/
protected $code;
/**
* @since 8.1
*/
public function getSqlState(): string {}
}
/**
@ -1857,17 +1882,17 @@ final class mysqli_driver
/**
* @var string
*/
public $client_info;
public string $client_info;
/**
* @var string
*/
public $client_version;
public int $client_version;
/**
* @var string
*/
public $driver_version;
public int $driver_version;
/**
* @var string
@ -1877,12 +1902,12 @@ final class mysqli_driver
/**
* @var bool
*/
public $reconnect;
public bool $reconnect;
/**
* @var int
*/
public $report_mode;
public int $report_mode;
}
/**
@ -1894,93 +1919,93 @@ class mysqli
/**
* @var int
*/
public $affected_rows;
public string|int $affected_rows;
/**
* @var string
*/
public $client_info;
public string $client_info;
/**
* @var int
*/
public $client_version;
public int $client_version;
/**
* @var int
*/
public $connect_errno;
public int $connect_errno;
/**
* @var string
*/
public $connect_error;
public string|null $connect_error;
/**
* @var int
*/
public $errno;
public int $errno;
/**
* @var string
*/
public $error;
public string $error;
/**
* @var int
*/
public $field_count;
public int $field_count;
/**
* @var string
*/
public $host_info;
public string $host_info;
/**
* @var string
*/
public $info;
public string|null $info;
/**
* @var int|string
*/
public $insert_id;
public int|string $insert_id;
/**
* @var string
*/
public $server_info;
public string $server_info;
/**
* @var int
*/
public $server_version;
public int $server_version;
/**
* @var string
*/
public $sqlstate;
public string $sqlstate;
/**
* @var string
*/
public $protocol_version;
public int $protocol_version;
/**
* @var int
*/
public $thread_id;
public int $thread_id;
/**
* @var int
*/
public $warning_count;
public int $warning_count;
/**
* @var array A list of errors, each as an associative array containing the errno, error, and sqlstate.
* @link https://secure.php.net/manual/en/mysqli.error-list.php
*/
public $error_list;
public array $error_list;
public $stat;
/**
@ -2664,17 +2689,17 @@ final class mysqli_warning
/**
* @var string
*/
public $message;
public string $message;
/**
* @var string
*/
public $sqlstate;
public string $sqlstate;
/**
* @var int
*/
public $errno;
public int $errno;
/**
* The __construct purpose
@ -2700,27 +2725,27 @@ class mysqli_result implements IteratorAggregate
/**
* @var int
*/
public $current_field;
public int $current_field;
/**
* @var int
*/
public $field_count;
public int $field_count;
/**
* @var array|null
*/
public $lengths;
public array|null $lengths;
/**
* @var int
*/
public $num_rows;
public int|string $num_rows;
/**
* @var mixed
*/
public $type;
public int $type;
/**
* Constructor (no docs available)
@ -3032,6 +3057,18 @@ class mysqli_result implements IteratorAggregate
#[TentativeType]
public function fetch_row(): array|false|null {}
/**
* Fetch a single column from the next row of a result set
*
* @param int $column [optional] <p>
* 0-indexed number of the column you wish to retrieve from the row.
* If no value is supplied, the first column will be returned.
* </p>
* @return string|int|float|false|null a single column from
* the next row of a result set or false if there are no more rows.
*/
public function fetch_column(int $column = 0): string|int|float|false|null {}
/**
* Set result pointer to a specified field offset
* @link https://php.net/manual/en/mysqli-result.field-seek.php
@ -3068,52 +3105,52 @@ class mysqli_stmt
/**
* @var int
*/
public $affected_rows;
public int|string $affected_rows;
/**
* @var int
*/
public $insert_id;
public int|string $insert_id;
/**
* @var int
*/
public $num_rows;
public int|string $num_rows;
/**
* @var int
*/
public $param_count;
public int $param_count;
/**
* @var int
*/
public $field_count;
public int $field_count;
/**
* @var int
*/
public $errno;
public int $errno;
/**
* @var string
*/
public $error;
public string $error;
/**
* @var array
*/
public $error_list;
public array $error_list;
/**
* @var string
*/
public $sqlstate;
public string $sqlstate;
/**
* @var string
*/
public $id;
public int $id;
/**
* mysqli_stmt constructor
@ -3261,7 +3298,7 @@ class mysqli_stmt
* @return bool true on success or false on failure.
*/
#[TentativeType]
public function execute(): bool {}
public function execute(?array $params = null): bool {}
/**
* Fetch results from a prepared statement into the bound variables

View File

@ -1,12 +1,13 @@
<?php
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
/**
* See <b>OCI_NO_AUTO_COMMIT</b>.
* @link https://php.net/manual/en/oci8.constants.php
*/
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Deprecated;
define('OCI_DEFAULT', 0);
/**
@ -2109,25 +2110,25 @@ function ocierror($connection_or_statement_resource) {}
/**
* (PHP 4, PHP 5, PECL OCI8 >= 1.0.0)<br/>
* Alias of
* {@see OCI-Lob::free}
* {@see OCILob::free}
* @link https://php.net/manual/en/function.ocifreedesc.php
* @param $lob_descriptor
* @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
*/
#[Deprecated(replacement: "OCI-Lob::free", since: "5.4")]
#[Deprecated(replacement: "OCILob::free", since: "5.4")]
function ocifreedesc($lob_descriptor) {}
/**
* (PHP 4, PHP 5, PECL OCI8 >= 1.0.0)<br/>
* Alias of
* {@see OCI-Lob::save}
* {@see OCILob::save}
* @link https://php.net/manual/en/function.ocisavelob.php
* @param OCILob $lob_descriptor
* @param string $data
* @param int $offset [optional]
* @return bool
*/
#[Deprecated(replacement: "OCI-Lob::save", since: "5.4")]
#[Deprecated(replacement: "OCILob::save", since: "5.4")]
function ocisavelob(OCILob $lob_descriptor, $data, $offset) {}
/**
@ -2338,7 +2339,7 @@ function ocicolltrim(OCICollection $collection, $number) {}
/**
* (PHP 4 >= 4.0.6, PECL OCI8 1.0)
* Writes a temporary large object
* Alias of {@see OCI-Lob::writeTemporary()}
* Alias of {@see OCILob::writeTemporary()}
* @link https://php.net/manual/en/function.ociwritetemporarylob.php
* @param OCILob $lob_descriptor
* @param string $data <p>The data to write.</p>
@ -2355,17 +2356,17 @@ function ocicolltrim(OCICollection $collection, $number) {}
* </ul>
* @return bool <p>Returns TRUE on success or FALSE on failure.</p>
*/
#[Deprecated(replacement: "OCI-Lob::writeTemporary", since: "5.4")]
#[Deprecated(replacement: "OCILob::writeTemporary", since: "5.4")]
function ociwritetemporarylob(OCILob $lob_descriptor, $data, $lob_type = OCI_TEMP_CLOB) {}
/**
* (PHP 4 >= 4.0.6, PECL OCI8 1.0)
* Alias of {@see OCI-Lob::close()}
* Alias of {@see OCILob::close()}
* @link https://php.net/manual/en/function.ocicloselob.php
* @param OCILob $lob_descriptor
* @return bool <p>Returns TRUE on success or FALSE on failure.</p>
*/
#[Deprecated(replacement: "OCI-Lob::close()", since: "5.4")]
#[Deprecated(replacement: "OCILob::close()", since: "5.4")]
function ocicloselob(OCILob $lob_descriptor) {}
/**

View File

@ -892,7 +892,7 @@ function openssl_encrypt(string $data, string $cipher_algo, string $passphrase,
* @param string $aad [optional] <p>Additional authentication data.</p>
* @return string|false The decrypted string on success or false on failure.
*/
function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = '', string $tag = null, string $aad = ''): string|false {}
function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = '', string|null $tag = null, string $aad = ''): string|false {}
/**
* (PHP 5 >= PHP 5.3.3)<br/>
@ -1219,7 +1219,7 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st
* if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG,
* passwords, etc. true if it did, otherwise false
* </p>
* @return string the generated string of bytes.
* @return string|false the generated string of bytes on success, or false on failure.
*/
function openssl_random_pseudo_bytes(int $length, &$strong_result): string {}

View File

@ -724,7 +724,7 @@ function pcntl_errno(): int {}
* @link https://php.net/manual/en/function.pcntl-strerror.php
* @param int $error_code <p>
* </p>
* @return string error description.
* @return string|false error description on success or <b>FALSE</b> on failure.
* @since 5.3.4
*/
#[Pure]

View File

@ -1,7 +1,5 @@
<?php
use JetBrains\PhpStorm\Pure;
/**
* Orders results so that $matches[0] is an array of full pattern
* matches, $matches[1] is an array of strings matched by the first
@ -9,6 +7,9 @@ use JetBrains\PhpStorm\Pure;
* <b>preg_match_all</b>.
* @link https://php.net/manual/en/pcre.constants.php
*/
use JetBrains\PhpStorm\Pure;
define('PREG_PATTERN_ORDER', 1);
/**
@ -337,7 +338,7 @@ function preg_match(string $pattern, string $subject, &$matches, int $flags = 0,
* So, $out[0] contains array of strings that matched full pattern,
* and $out[1] contains array of strings enclosed by tags.
* </p>
* @return int|false the number of full pattern matches (which might be zero),
* @return int|false|null the number of full pattern matches (which might be zero),
* or <b>FALSE</b> if an error occurred.
*/
function preg_match_all(string $pattern, string $subject, &$matches, int $flags = 0, int $offset = 0): int|false {}

View File

@ -1,6 +1,9 @@
<?php
use JetBrains\PhpStorm\ArrayShape;
use PgSql\Connection;
use PgSql\Lob;
use PgSql\Result;
define('PGSQL_LIBPQ_VERSION', "14.5");
@ -417,9 +420,9 @@ define('PGSQL_DIAG_SEVERITY_NONLOCALIZED', 86);
* is created, even if the <i>connection_string</i> is identical to
* an existing connection.
* </p>
* @return resource|false PostgreSQL connection resource on success, <b>FALSE</b> on failure.
* @return Connection|false PostgreSQL connection resource on success, <b>FALSE</b> on failure.
*/
function pg_connect(string $connection_string, int $flags = 0) {}
function pg_connect(string $connection_string, int $flags = 0): Connection|false {}
/**
* Open a persistent PostgreSQL connection
@ -448,9 +451,9 @@ function pg_connect(string $connection_string, int $flags = 0) {}
* is created, even if the <i>connection_string</i> is identical to
* an existing connection.
* </p>
* @return resource|false PostgreSQL connection resource on success, <b>FALSE</b> on failure.
* @return Connection|false PostgreSQL connection resource on success, <b>FALSE</b> on failure.
*/
function pg_pconnect(string $connection_string, int $flags = 0) {}
function pg_pconnect(string $connection_string, int $flags = 0): Connection|false {}
/**
* Closes a PostgreSQL connection
@ -463,7 +466,7 @@ function pg_pconnect(string $connection_string, int $flags = 0) {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_close($connection = null): bool {}
function pg_close(Connection|null $connection = null): bool {}
/**
* Poll the status of an in-progress asynchronous PostgreSQL connection attempt.
@ -475,7 +478,7 @@ function pg_close($connection = null): bool {}
* <b>PGSQL_POLLING_OK</b>, or <b>PGSQL_POLLING_ACTIVE</b>.
* @since 5.6
*/
function pg_connect_poll($connection): int {}
function pg_connect_poll(Connection $connection): int {}
/**
* Get connection status
@ -486,7 +489,7 @@ function pg_connect_poll($connection): int {}
* @return int <b>PGSQL_CONNECTION_OK</b> or
* <b>PGSQL_CONNECTION_BAD</b>.
*/
function pg_connection_status($connection): int {}
function pg_connection_status(Connection $connection): int {}
/**
* Get connection is busy or not
@ -496,7 +499,7 @@ function pg_connection_status($connection): int {}
* </p>
* @return bool <b>TRUE</b> if the connection is busy, <b>FALSE</b> otherwise.
*/
function pg_connection_busy($connection): bool {}
function pg_connection_busy(Connection $connection): bool {}
/**
* Reset connection (reconnect)
@ -506,7 +509,7 @@ function pg_connection_busy($connection): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_connection_reset($connection): bool {}
function pg_connection_reset(Connection $connection): bool {}
/**
* Get a read only handle to the socket underlying a PostgreSQL connection
@ -517,7 +520,7 @@ function pg_connection_reset($connection): bool {}
* @return resource|false A socket resource on success or <b>FALSE</b> on failure.
* @since 5.6
*/
function pg_socket($connection) {}
function pg_socket(Connection $connection) {}
/**
* Returns the host name associated with the connection
@ -531,7 +534,7 @@ function pg_socket($connection) {}
* @return string|false A string containing the name of the host the
* <i>connection</i> is to, or <b>FALSE</b> on error.
*/
function pg_host($connection = null): string {}
function pg_host(Connection|null $connection = null): string {}
/**
* Get the database name
@ -545,7 +548,7 @@ function pg_host($connection = null): string {}
* @return string|false A string containing the name of the database the
* <i>connection</i> is to, or <b>FALSE</b> on error.
*/
function pg_dbname($connection = null): string {}
function pg_dbname(Connection|null $connection = null): string {}
/**
* Return the port number associated with the connection
@ -558,7 +561,7 @@ function pg_dbname($connection = null): string {}
* </p>
* @return string A string containing the port number of the database server the connection is to, or empty string on error.
*/
function pg_port($connection = null): string {}
function pg_port(Connection|null $connection = null): string {}
/**
* Return the TTY name associated with the connection
@ -572,7 +575,7 @@ function pg_port($connection = null): string {}
* @return string A string containing the debug TTY of
* the <i>connection</i>, or <b>FALSE</b> on error.
*/
function pg_tty($connection = null): string {}
function pg_tty(Connection|null $connection = null): string {}
/**
* Get the options associated with the connection
@ -586,7 +589,7 @@ function pg_tty($connection = null): string {}
* @return string A string containing the <i>connection</i>
* options, or <b>FALSE</b> on error.
*/
function pg_options($connection = null): string {}
function pg_options(Connection|null $connection = null): string {}
/**
* Returns an array with client, protocol and server version (when available)
@ -602,7 +605,7 @@ function pg_options($connection = null): string {}
* <b>FALSE</b> on error or invalid connection.
*/
#[ArrayShape(["client" => "string", "protocol" => "int", "server" => "string"])]
function pg_version($connection = null): array {}
function pg_version(Connection|null $connection = null): array {}
/**
* Ping database connection
@ -615,7 +618,7 @@ function pg_version($connection = null): array {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_ping($connection = null): bool {}
function pg_ping(Connection|null $connection = null): bool {}
/**
* Looks up a current parameter setting of the server.
@ -652,7 +655,7 @@ function pg_parameter_status($connection, string $name = null): string|false {}
* <b>PGSQL_TRANSACTION_ACTIVE</b> is reported only when a query
* has been sent to the server and not yet completed.
*/
function pg_transaction_status($connection): int {}
function pg_transaction_status(Connection $connection): int {}
/**
* Execute a query
@ -680,9 +683,9 @@ function pg_transaction_status($connection): int {}
* Any user-supplied data substituted directly into a query string should
* be properly escaped.
* </p>
* @return resource|false A query result resource on success or <b>FALSE</b> on failure.
* @return Result|false A query result resource on success or <b>FALSE</b> on failure.
*/
function pg_query($connection, string $query = null) {}
function pg_query($connection, string $query = null): Result|false {}
/**
* Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.
@ -716,9 +719,9 @@ function pg_query($connection, string $query = null) {}
* parameters. Use <b>pg_escape_bytea</b> instead, or use the
* large object functions.
* </p>
* @return resource|false A query result resource on success or <b>FALSE</b> on failure.
* @return Result|false A query result resource on success or <b>FALSE</b> on failure.
*/
function pg_query_params($connection, $query, array $params = null) {}
function pg_query_params($connection, $query, array $params = null): Result|false {}
/**
* Submits a request to create a prepared statement with the
@ -740,9 +743,9 @@ function pg_query_params($connection, $query, array $params = null) {}
* (multiple statements separated by semi-colons are not allowed.) If any parameters
* are used, they are referred to as $1, $2, etc.
* </p>
* @return resource|false A query result resource on success or <b>FALSE</b> on failure.
* @return Result|false A query result resource on success or <b>FALSE</b> on failure.
*/
function pg_prepare($connection, string $statement_name, string $query = null) {}
function pg_prepare($connection, string $statement_name, string $query = null): Result|false {}
/**
* Sends a request to execute a prepared statement with given parameters, and waits for the result.
@ -768,9 +771,9 @@ function pg_prepare($connection, string $statement_name, string $query = null) {
* <p>
* Elements are converted to strings by calling this function.
* </p>
* @return resource|false A query result resource on success or <b>FALSE</b> on failure.
* @return Result|false A query result resource on success or <b>FALSE</b> on failure.
*/
function pg_execute($connection, $statement_name, array $params = null) {}
function pg_execute($connection, $statement_name, array $params = null): Result|false {}
/**
* Sends asynchronous query
@ -788,7 +791,7 @@ function pg_execute($connection, $statement_name, array $params = null) {}
* <p>
* Use <b>pg_get_result</b> to determine the query result.
*/
function pg_send_query($connection, string $query): int|bool {}
function pg_send_query(Connection $connection, string $query): int|bool {}
/**
* Submits a command and separate parameters to the server without waiting for the result(s).
@ -810,7 +813,7 @@ function pg_send_query($connection, string $query): int|bool {}
* <p>
* Use <b>pg_get_result</b> to determine the query result.
*/
function pg_send_query_params($connection, string $query, array $params): int|bool {}
function pg_send_query_params(Connection $connection, string $query, array $params): int|bool {}
/**
* Sends a request to create a prepared statement with the given parameters, without waiting for completion.
@ -834,7 +837,7 @@ function pg_send_query_params($connection, string $query, array $params): int|bo
* @return int|bool <b>TRUE</b> on success, <b>FALSE</b> on failure. Use <b>pg_get_result</b>
* to determine the query result.
*/
function pg_send_prepare($connection, string $statement_name, string $query): int|bool {}
function pg_send_prepare(Connection $connection, string $statement_name, string $query): int|bool {}
/**
* Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).
@ -860,7 +863,7 @@ function pg_send_prepare($connection, string $statement_name, string $query): in
* @return int|bool <b>TRUE</b> on success, <b>FALSE</b> on failure. Use <b>pg_get_result</b>
* to determine the query result.
*/
function pg_send_execute($connection, string $statement_name, array $params): int|bool {}
function pg_send_execute(Connection $connection, string $statement_name, array $params): int|bool {}
/**
* Cancel an asynchronous query
@ -870,7 +873,7 @@ function pg_send_execute($connection, string $statement_name, array $params): in
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_cancel_query($connection): bool {}
function pg_cancel_query(Connection $connection): bool {}
/**
* Returns values from a result resource
@ -899,7 +902,7 @@ function pg_cancel_query($connection): bool {}
* <b>FALSE</b> is returned if <i>row</i> exceeds the number
* of rows in the set, or on any other error.
*/
function pg_fetch_result($result, $row, string|int $field = null): string|false|null {}
function pg_fetch_result(Result $result, $row, string|int $field = null): string|false|null {}
/**
* Get a row as an enumerated array
@ -922,7 +925,7 @@ function pg_fetch_result($result, $row, string|int $field = null): string|false|
* <b>FALSE</b> is returned if <i>row</i> exceeds the number
* of rows in the set, there are no more rows, or on any other error.
*/
function pg_fetch_row($result, ?int $row = null, int $mode = 2): array|false {}
function pg_fetch_row(Result $result, ?int $row = null, int $mode = 2): array|false {}
/**
* Fetch a row as an associative array
@ -945,7 +948,7 @@ function pg_fetch_row($result, ?int $row = null, int $mode = 2): array|false {}
* <b>FALSE</b> is returned if <i>row</i> exceeds the number
* of rows in the set, there are no more rows, or on any other error.
*/
function pg_fetch_assoc($result, ?int $row = null): array|false {}
function pg_fetch_assoc(Result $result, ?int $row = null): array|false {}
/**
* Fetch a row as an array
@ -981,7 +984,7 @@ function pg_fetch_assoc($result, ?int $row = null): array|false {}
* <b>FALSE</b> is returned if <i>row</i> exceeds the number
* of rows in the set, there are no more rows, or on any other error.
*/
function pg_fetch_array($result, ?int $row = null, int $mode = PGSQL_BOTH): array|false {}
function pg_fetch_array(Result $result, ?int $row = null, int $mode = PGSQL_BOTH): array|false {}
/**
* Fetch a row as an object
@ -1008,7 +1011,7 @@ function pg_fetch_array($result, ?int $row = null, int $mode = PGSQL_BOTH): arra
* <b>FALSE</b> is returned if <i>row</i> exceeds the number
* of rows in the set, there are no more rows, or on any other error.
*/
function pg_fetch_object($result, ?int $row = null, string $class = 'stdClass', array $constructor_args = []): object|false {}
function pg_fetch_object(Result $result, ?int $row = null, string $class = 'stdClass', array $constructor_args = []): object|false {}
/**
* Fetches all rows from a result as an array
@ -1037,7 +1040,7 @@ function pg_fetch_object($result, ?int $row = null, string $class = 'stdClass',
* <b>FALSE</b> is returned if there are no rows in the result, or on any
* other error.
*/
function pg_fetch_all($result, int $mode = PGSQL_ASSOC): array {}
function pg_fetch_all(Result $result, int $mode = PGSQL_ASSOC): array {}
/**
* Fetches all rows in a particular result column as an array
@ -1057,7 +1060,7 @@ function pg_fetch_all($result, int $mode = PGSQL_ASSOC): array {}
* of columns in the result, or on any other error.
* </p>
*/
function pg_fetch_all_columns($result, int $field = 0): array {}
function pg_fetch_all_columns(Result $result, int $field = 0): array {}
/**
* Returns number of affected records (tuples)
@ -1070,17 +1073,17 @@ function pg_fetch_all_columns($result, int $field = 0): array {}
* @return int The number of rows affected by the query. If no tuple is
* affected, it will return 0.
*/
function pg_affected_rows($result): int {}
function pg_affected_rows(Result $result): int {}
/**
* Get asynchronous query result
* @link https://php.net/manual/en/function.pg-get-result.php
* @param resource $connection <p>
* @param Connection $connection <p>
* PostgreSQL database connection resource.
* </p>
* @return resource|false The result resource, or <b>FALSE</b> if no more results are available.
* @return Result|false The result resource, or <b>FALSE</b> if no more results are available.
*/
function pg_get_result($connection) {}
function pg_get_result(Connection $connection): Result|false {}
/**
* Set internal row offset in result resource
@ -1096,7 +1099,7 @@ function pg_get_result($connection) {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_result_seek($result, int $row): bool {}
function pg_result_seek(Result $result, int $row): bool {}
/**
* Get status of query result
@ -1118,7 +1121,7 @@ function pg_result_seek($result, int $row): bool {}
* <b>PGSQL_FATAL_ERROR</b> if <b>PGSQL_STATUS_LONG</b> is
* specified. Otherwise, a string containing the PostgreSQL command tag is returned.
*/
function pg_result_status($result, int $mode = PGSQL_STATUS_LONG): string|int {}
function pg_result_status(Result $result, int $mode = PGSQL_STATUS_LONG): string|int {}
/**
* Free result memory
@ -1130,7 +1133,7 @@ function pg_result_status($result, int $mode = PGSQL_STATUS_LONG): string|int {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_free_result($result): bool {}
function pg_free_result(Result $result): bool {}
/**
* Returns the last row's OID
@ -1144,7 +1147,7 @@ function pg_free_result($result): bool {}
* row in the specified <i>connection</i>, or <b>FALSE</b> on error or
* no available OID.
*/
function pg_last_oid($result): string|int|false {}
function pg_last_oid(Result $result): string|int|false {}
/**
* Returns the number of rows in a result
@ -1156,7 +1159,7 @@ function pg_last_oid($result): string|int|false {}
* </p>
* @return int The number of rows in the result. On error, -1 is returned.
*/
function pg_num_rows($result): int {}
function pg_num_rows(Result $result): int {}
/**
* Returns the number of fields in a result
@ -1168,7 +1171,7 @@ function pg_num_rows($result): int {}
* </p>
* @return int The number of fields (columns) in the result. On error, -1 is returned.
*/
function pg_num_fields($result): int {}
function pg_num_fields(Result $result): int {}
/**
* Returns the name of a field
@ -1183,7 +1186,7 @@ function pg_num_fields($result): int {}
* </p>
* @return string|false The field name, or <b>FALSE</b> on error.
*/
function pg_field_name($result, int $field): string {}
function pg_field_name(Result $result, int $field): string {}
/**
* Returns the field number of the named field
@ -1198,7 +1201,7 @@ function pg_field_name($result, int $field): string {}
* </p>
* @return int The field number (numbered from 0), or -1 on error.
*/
function pg_field_num($result, string $field): int {}
function pg_field_num(Result $result, string $field): int {}
/**
* Returns the internal storage size of the named field
@ -1214,7 +1217,7 @@ function pg_field_num($result, string $field): int {}
* @return int The internal field storage size (in bytes). -1 indicates a variable
* length field. <b>FALSE</b> is returned on error.
*/
function pg_field_size($result, int $field): int {}
function pg_field_size(Result $result, int $field): int {}
/**
* Returns the type name for the corresponding field number
@ -1230,7 +1233,7 @@ function pg_field_size($result, int $field): int {}
* @return string|false A string containing the base name of the field's type, or <b>FALSE</b>
* on error.
*/
function pg_field_type($result, int $field): string {}
function pg_field_type(Result $result, int $field): string {}
/**
* Returns the type ID (OID) for the corresponding field number
@ -1245,7 +1248,7 @@ function pg_field_type($result, int $field): string {}
* </p>
* @return string|int The OID of the field's base type. <b>FALSE</b> is returned on error.
*/
function pg_field_type_oid($result, int $field): string|int {}
function pg_field_type_oid(Result $result, int $field): string|int {}
/**
* Returns the printed length
@ -1259,7 +1262,7 @@ function pg_field_type_oid($result, int $field): string|int {}
* @param mixed $field
* @return int|false The field printed length, or <b>FALSE</b> on error.
*/
function pg_field_prtlen($result, $row, string|int $field = null): int|false {}
function pg_field_prtlen(Result $result, $row, string|int $field = null): int|false {}
/**
* Test if a field is SQL NULL
@ -1280,7 +1283,7 @@ function pg_field_prtlen($result, $row, string|int $field = null): int|false {}
* @return int|false 1 if the field in the given row is SQL NULL, 0
* if not. <b>FALSE</b> is returned if the row is out of range, or upon any other error.
*/
function pg_field_is_null($result, $row, string|int $field = null): int|false {}
function pg_field_is_null(Result $result, $row, string|int $field = null): int|false {}
/**
* Returns the name or oid of the tables field
@ -1300,7 +1303,7 @@ function pg_field_is_null($result, $row, string|int $field = null): int|false {}
* </p>
* @return string|int|false On success either the fields table name or oid. Or, <b>FALSE</b> on failure.
*/
function pg_field_table($result, int $field, bool $oid_only = false): string|int|false {}
function pg_field_table(Result $result, int $field, bool $oid_only = false): string|int|false {}
/**
* Gets SQL NOTIFY message
@ -1324,7 +1327,7 @@ function pg_field_table($result, int $field, bool $oid_only = false): string|int
* Otherwise if no NOTIFY is waiting, then <b>FALSE</b> is returned.
*/
#[ArrayShape(["message" => "string", "pid" => "int", "payload" => "string"])]
function pg_get_notify($connection, int $mode = 1): array|false {}
function pg_get_notify(Connection $connection, int $mode = 1): array|false {}
/**
* Gets the backend's process ID
@ -1334,7 +1337,7 @@ function pg_get_notify($connection, int $mode = 1): array|false {}
* </p>
* @return int The backend database process ID.
*/
function pg_get_pid($connection): int {}
function pg_get_pid(Connection $connection): int {}
/**
* Get error message associated with result
@ -1347,7 +1350,7 @@ function pg_get_pid($connection): int {}
* @return string|false a string if there is an error associated with the
* <i>result</i> parameter, <b>FALSE</b> otherwise.
*/
function pg_result_error($result): string|false {}
function pg_result_error(Result $result): string|false {}
/**
* Returns an individual field of an error report.
@ -1370,7 +1373,7 @@ function pg_result_error($result): string|false {}
* @return string|null|false A string containing the contents of the error field, <b>NULL</b> if the field does not exist or <b>FALSE</b>
* on failure.
*/
function pg_result_error_field($result, int $field_code): string|false|null {}
function pg_result_error_field(Result $result, int $field_code): string|false|null {}
/**
* Get the last error message string of a connection
@ -1384,7 +1387,7 @@ function pg_result_error_field($result, int $field_code): string|false|null {}
* @return string A string containing the last error message on the
* given <i>connection</i>, or <b>FALSE</b> on error.
*/
function pg_last_error($connection = null): string {}
function pg_last_error(Connection|null $connection = null): string {}
/**
* Returns the last notice message from PostgreSQL server
@ -1403,7 +1406,7 @@ function pg_last_error($connection = null): string {}
* a bool with <b>PGSQL_NOTICE_CLEAR</b>, or
* <b>FALSE</b> on error.
*/
function pg_last_notice($connection, int $mode = PGSQL_NOTICE_LAST): array|string|bool {}
function pg_last_notice(Connection $connection, int $mode = PGSQL_NOTICE_LAST): array|string|bool {}
/**
* Send a NULL-terminated string to PostgreSQL backend
@ -1433,7 +1436,7 @@ function pg_put_line($connection, string $query = null): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_end_copy($connection = null): bool {}
function pg_end_copy(Connection|null $connection = null): bool {}
/**
* Copy a table to an array
@ -1455,7 +1458,7 @@ function pg_end_copy($connection = null): bool {}
* @return array|false An array with one element for each line of COPY data.
* It returns <b>FALSE</b> on failure.
*/
function pg_copy_to($connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array|false {}
function pg_copy_to(Connection $connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array|false {}
/**
* Insert records into a table from an array
@ -1482,7 +1485,7 @@ function pg_copy_to($connection, string $table_name, string $separator = "\t", s
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_copy_from($connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N"): bool {}
function pg_copy_from(Connection $connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N"): bool {}
/**
* Enable tracing a PostgreSQL connection
@ -1502,7 +1505,7 @@ function pg_copy_from($connection, string $table_name, array $rows, string $sepa
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_trace(string $filename, string $mode = 'w', $connection = null): bool {}
function pg_trace(string $filename, string $mode = 'w', Connection|null $connection = null): bool {}
/**
* Disable tracing of a PostgreSQL connection
@ -1515,7 +1518,7 @@ function pg_trace(string $filename, string $mode = 'w', $connection = null): boo
* </p>
* @return bool Always returns <b>TRUE</b>.
*/
function pg_untrace($connection = null): bool {}
function pg_untrace(Connection|null $connection = null): bool {}
/**
* Create a large object
@ -1569,9 +1572,9 @@ function pg_lo_unlink($connection, $oid = null): bool {}
* Can be either "r" for read-only, "w" for write only or "rw" for read and
* write.
* </p>
* @return resource|false A large object resource or <b>FALSE</b> on error.
* @return Lob|false A large object resource or <b>FALSE</b> on error.
*/
function pg_lo_open($connection, $oid = null, string $mode = null) {}
function pg_lo_open($connection, $oid = null, string $mode = null): Lob|false {}
/**
* Close a large object
@ -1579,7 +1582,7 @@ function pg_lo_open($connection, $oid = null, string $mode = null) {}
* @param resource $lob
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_lo_close($lob): bool {}
function pg_lo_close(Lob $lob): bool {}
/**
* Read a large object
@ -1593,7 +1596,7 @@ function pg_lo_close($lob): bool {}
* @return string|false A string containing <i>len</i> bytes from the
* large object, or <b>FALSE</b> on error.
*/
function pg_lo_read($lob, int $length = 8192): string|false {}
function pg_lo_read(Lob $lob, int $length = 8192): string|false {}
/**
* Write to a large object
@ -1613,7 +1616,7 @@ function pg_lo_read($lob, int $length = 8192): string|false {}
* </p>
* @return int|false The number of bytes written to the large object, or <b>FALSE</b> on error.
*/
function pg_lo_write($lob, string $data, ?int $length = null): int|false {}
function pg_lo_write(Lob $lob, string $data, ?int $length = null): int|false {}
/**
* Reads an entire large object and send straight to browser
@ -1623,7 +1626,7 @@ function pg_lo_write($lob, string $data, ?int $length = null): int|false {}
* </p>
* @return int|false Number of bytes read or <b>FALSE</b> on error.
*/
function pg_lo_read_all($lob): int {}
function pg_lo_read_all(Lob $lob): int {}
/**
* Import a large object from file
@ -1648,7 +1651,7 @@ function pg_lo_read_all($lob): int {}
* @return string|int|false The OID of the newly created large object, or
* <b>FALSE</b> on failure.
*/
function pg_lo_import($connection, $pathname, $object_id = null): string|int|false {}
function pg_lo_import(Connection $connection, $pathname, $object_id = null): string|int|false {}
/**
* Export a large object to file
@ -1668,7 +1671,7 @@ function pg_lo_import($connection, $pathname, $object_id = null): string|int|fal
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_lo_export($connection, $oid, $pathname): bool {}
function pg_lo_export(Connection $connection, $oid, $pathname): bool {}
/**
* Seeks position within a large object
@ -1686,7 +1689,7 @@ function pg_lo_export($connection, $oid, $pathname): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pg_lo_seek($lob, int $offset, int $whence = PGSQL_SEEK_CUR): bool {}
function pg_lo_seek(Lob $lob, int $offset, int $whence = PGSQL_SEEK_CUR): bool {}
/**
* Returns current seek position a of large object
@ -1697,7 +1700,7 @@ function pg_lo_seek($lob, int $offset, int $whence = PGSQL_SEEK_CUR): bool {}
* @return int The current seek offset (in number of bytes) from the beginning of the large
* object. If there is an error, the return value is negative.
*/
function pg_lo_tell($lob): int {}
function pg_lo_tell(Lob $lob): int {}
/**
* Truncates a large object
@ -1708,7 +1711,7 @@ function pg_lo_tell($lob): int {}
* @param int $size The number of bytes to truncate.
* @return bool Returns true on success or false on failure.
*/
function pg_lo_truncate($lob, int $size): bool {}
function pg_lo_truncate(Lob $lob, int $size): bool {}
/**
* Escape a string for query
@ -1820,7 +1823,7 @@ function pg_set_error_verbosity($connection, int $verbosity = null): int|false {
* </p>
* @return string|false The client encoding, or <b>FALSE</b> on error.
*/
function pg_client_encoding($connection = null): string {}
function pg_client_encoding(Connection|null $connection = null): string {}
/**
* Set the client encoding
@ -1857,7 +1860,7 @@ function pg_set_client_encoding($connection, string $encoding = null): int {}
* </p>
* @return array|false An array of the table definition, or <b>FALSE</b> on error.
*/
function pg_meta_data($connection, string $table_name, bool $extended = false): array|false {}
function pg_meta_data(Connection $connection, string $table_name, bool $extended = false): array|false {}
/**
* Convert associative array values into suitable for SQL statement
@ -1878,7 +1881,7 @@ function pg_meta_data($connection, string $table_name, bool $extended = false):
* </p>
* @return array|false An array of converted values, or <b>FALSE</b> on error.
*/
function pg_convert($connection, string $table_name, array $values, int $flags = 0): array|false {}
function pg_convert(Connection $connection, string $table_name, array $values, int $flags = 0): array|false {}
/**
* Insert array into table
@ -1902,10 +1905,10 @@ function pg_convert($connection, string $table_name, array $values, int $flags =
* <b>PGSQL_DML_STRING</b> combined. If <b>PGSQL_DML_STRING</b> is part of the
* <i>options</i> then query string is returned.
* </p>
* @return mixed <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
* @return Result|string|bool <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
* via <i>options</i>.
*/
function pg_insert($connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC) {}
function pg_insert(Connection $connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC): Result|string|bool {}
/**
* Update table
@ -1934,7 +1937,7 @@ function pg_insert($connection, string $table_name, array $values, int $flags =
* @return string|bool <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
* via <i>options</i>.
*/
function pg_update($connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
function pg_update(Connection $connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
/**
* Deletes records
@ -1959,12 +1962,12 @@ function pg_update($connection, string $table_name, array $values, array $condit
* @return string|bool <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
* via <i>options</i>.
*/
function pg_delete($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
function pg_delete(Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
/**
* Select records
* @link https://php.net/manual/en/function.pg-select.php
* @param resource|PgSql\Connection $connection <p>
* @param resource|Connection $connection <p>
* PostgreSQL database connection resource.
* </p>
* @param string $table_name <p>
@ -1997,49 +2000,49 @@ function pg_delete($connection, string $table_name, array $conditions, int $flag
* @return array|string|false <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns string if <b>PGSQL_DML_STRING</b> is passed
* via <i>options</i>.
*/
function pg_select($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC): array|string|false {}
function pg_select(Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC): array|string|false {}
/**
* @param $connection
* @param $query
* @return mixed
* @return Result|false
*/
function pg_exec($connection, string $query = null) {}
function pg_exec($connection, string $query = null): Result|false {}
/**
* @param $result
* @return string|int|false
* @deprecated
*/
function pg_getlastoid($result): string|int|false {}
function pg_getlastoid(Result $result): string|int|false {}
/**
* @param $result
* @return int
* @deprecated
*/
function pg_cmdtuples($result): int {}
function pg_cmdtuples(Result $result): int {}
/**
* @param $connection [optional]
* @return string
* @deprecated
*/
function pg_errormessage($connection): string {}
function pg_errormessage(Connection|null $connection): string {}
/**
* @param $result
* @return int
* @deprecated
*/
function pg_numrows($result): int {}
function pg_numrows(Result $result): int {}
/**
* @param $result
* @return int
* @deprecated
*/
function pg_numfields($result): int {}
function pg_numfields(Result $result): int {}
/**
* @param $result
@ -2047,7 +2050,7 @@ function pg_numfields($result): int {}
* @return string
* @deprecated
*/
function pg_fieldname($result, int $field): string {}
function pg_fieldname(Result $result, int $field): string {}
/**
* @param $result
@ -2055,7 +2058,7 @@ function pg_fieldname($result, int $field): string {}
* @return int
* @deprecated
*/
function pg_fieldsize($result, int $field): int {}
function pg_fieldsize(Result $result, int $field): int {}
/**
* @param $result
@ -2063,7 +2066,7 @@ function pg_fieldsize($result, int $field): int {}
* @return string
* @deprecated
*/
function pg_fieldtype($result, int $field): string {}
function pg_fieldtype(Result $result, int $field): string {}
/**
* @param $result
@ -2071,7 +2074,7 @@ function pg_fieldtype($result, int $field): string {}
* @return int
* @deprecated
*/
function pg_fieldnum($result, string $field): int {}
function pg_fieldnum(Result $result, string $field): int {}
/**
* @param $result
@ -2080,7 +2083,7 @@ function pg_fieldnum($result, string $field): int {}
* @return int|false
* @deprecated
*/
function pg_fieldprtlen($result, $row, string|int $field): int|false {}
function pg_fieldprtlen(Result $result, $row, string|int $field): int|false {}
/**
* @param $result
@ -2089,28 +2092,28 @@ function pg_fieldprtlen($result, $row, string|int $field): int|false {}
* @return int|false
* @deprecated
*/
function pg_fieldisnull($result, $row, string|int $field): int|false {}
function pg_fieldisnull(Result $result, $row, string|int $field): int|false {}
/**
* @param $result
* @return bool
* @deprecated
*/
function pg_freeresult($result): bool {}
function pg_freeresult(Result $result): bool {}
/**
* @param resource $result
* @param Result|resource $result
* @param $row
* @param $field
* @deprecated
*/
function pg_result($result, $row, string|int $field = null): string|null|false {}
function pg_result(Result $result, $row, string|int $field = null): string|null|false {}
/**
* @param $lob
* @deprecated
*/
function pg_loreadall($lob): int {}
function pg_loreadall(Lob $lob): int {}
/**
* @param $connection [optional]
@ -2132,17 +2135,17 @@ function pg_lounlink($connection, $oid): bool {}
* @param $connection
* @param $oid [optional]
* @param $mode [optional]
* @return resource
* @return Lob|false
* @deprecated
*/
function pg_loopen($connection, $oid, string $mode) {}
function pg_loopen($connection, $oid, string $mode): Lob|false {}
/**
* @param $lob
* @return bool
* @deprecated
*/
function pg_loclose($lob): bool {}
function pg_loclose(Lob $lob): bool {}
/**
* @param $lob
@ -2150,7 +2153,7 @@ function pg_loclose($lob): bool {}
* @return string|false
* @deprecated
*/
function pg_loread($lob, int $length = 8192): string|false {}
function pg_loread(Lob $lob, int $length = 8192): string|false {}
/**
* @param $lob
@ -2159,7 +2162,7 @@ function pg_loread($lob, int $length = 8192): string|false {}
* @return int|false
* @deprecated
*/
function pg_lowrite($lob, string $data, ?int $length): int|false {}
function pg_lowrite(Lob $lob, string $data, ?int $length): int|false {}
/**
* @param $connection
@ -2184,7 +2187,7 @@ function pg_loexport($connection, $oid, $filename): bool {}
* @return string
* @deprecated
*/
function pg_clientencoding($connection): string {}
function pg_clientencoding(Connection|null $connection): string {}
/**
* @param $connection
@ -2197,17 +2200,17 @@ function pg_setclientencoding($connection, string $encoding): int {}
/**
* Reads input on the connection
* @link https://www.php.net/manual/en/function.pg-consume-input.php
* @param resource $connection
* @param Connection|resource $connection
* @return bool true if no error occurred, or false if there was an error.
* Note that true does not necessarily indicate that input was waiting to be read.
*/
function pg_consume_input($connection): bool {}
function pg_consume_input(Connection $connection): bool {}
/**
* Flush outbound query data on the connection
* @link https://www.php.net/manual/en/function.pg-flush.php
* @param resource $connection
* @param Connection|resource $connection
* @return int|bool Returns true if the flush was successful or no data was waiting to be flushed, 0 if part of the pending
* data was flushed but more remains or false on failure.
*/
function pg_flush($connection): int|bool {}
function pg_flush(Connection $connection): int|bool {}

24
pgsql/pgsql_c.php Normal file
View File

@ -0,0 +1,24 @@
<?php
namespace PgSql;
/**
* A fully opaque class which replaces a pgsql result resource as of PHP 8.1.0.
* @since 8.1
* @link https://www.php.net/manual/en/class.pgsql-result.php
*/
final class Result {}
/**
* A fully opaque class which replaces a pgsql large object resource as of PHP 8.1.0.
* @since 8.1
* @link https://www.php.net/manual/en/class.pgsql-lob.php
*/
final class Lob {}
/**
* A fully opaque class which replaces a pgsql link resource as of PHP 8.1.0.
* @since 8.1
* @link https://www.php.net/manual/en/class.pgsql-connection.php
*/
final class Connection {}

View File

@ -1,13 +1,14 @@
<phpunit bootstrap="vendor/autoload.php"
failOnWarning="true">
<testsuites>
<testsuite name="PHP_8.0">
<testsuite name="PHP_8.1">
<file>tests/BaseClassesTest.php</file>
<file>tests/BaseConstantsTest.php</file>
<file>tests/BaseFunctionsTest.php</file>
<file>tests/StubsParameterNamesTest.php</file>
<file>tests/StubsTypeHintsTest.php</file>
<file>tests/StubsForbiddenTypeHintsTest.php</file>
<file>tests/StubsPhp81Tests.php</file>
</testsuite>
<testsuite name="PhpDoc">
<file>tests/StubsPhpDocTest.php</file>

View File

@ -1,12 +1,13 @@
<?php
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Pure;
/**
* Check whether the file exists.
* @link https://php.net/manual/en/posix.constants.php
*/
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Pure;
define('POSIX_F_OK', 0);
/**

View File

@ -1,5 +1,8 @@
<?php
use PSpell\Config;
use PSpell\Dictionary;
define('PSPELL_FAST', 1);
define('PSPELL_NORMAL', 2);
@ -38,9 +41,9 @@ define('PSPELL_RUN_TOGETHER', 8);
* There are several modes available:
* <b>PSPELL_FAST</b> - Fast mode (least number of
* suggestions)</p>
* @return int|false the dictionary link identifier on success or <b>FALSE</b> on failure.
* @return Dictionary|false the dictionary link identifier on success or <b>FALSE</b> on failure.
*/
function pspell_new(string $language, string $spelling = '', string $jargon = '', string $encoding = '', int $mode = 0): int|false {}
function pspell_new(string $language, string $spelling = '', string $jargon = '', string $encoding = '', int $mode = 0): Dictionary|false {}
/**
* Load a new dictionary with personal wordlist
@ -75,9 +78,9 @@ function pspell_new(string $language, string $spelling = '', string $jargon = ''
* The mode in which spellchecker will work. There are several modes available:
* <b>PSPELL_FAST</b> - Fast mode (least number of
* suggestions)</p>
* @return int|false the dictionary link identifier for use in other pspell functions.
* @return Dictionary|false the dictionary link identifier for use in other pspell functions.
*/
function pspell_new_personal(string $filename, string $language, string $spelling = '', string $jargon = '', string $encoding = '', int $mode = 0): int|false {}
function pspell_new_personal(string $filename, string $language, string $spelling = '', string $jargon = '', string $encoding = '', int $mode = 0): Dictionary|false {}
/**
* Load a new dictionary with settings based on a given config
@ -86,9 +89,9 @@ function pspell_new_personal(string $filename, string $language, string $spellin
* The <i>config</i> parameter is the one returned by
* <b>pspell_config_create</b> when the config was created.
* </p>
* @return int|false a dictionary link identifier on success.
* @return Dictionary|false a dictionary link identifier on success.
*/
function pspell_new_config(int $config): int|false {}
function pspell_new_config(Config $config): Dictionary|false {}
/**
* Check a word
@ -99,7 +102,7 @@ function pspell_new_config(int $config): int|false {}
* </p>
* @return bool <b>TRUE</b> if the spelling is correct, <b>FALSE</b> if not.
*/
function pspell_check(int $dictionary, string $word): bool {}
function pspell_check(Dictionary $dictionary, string $word): bool {}
/**
* Suggest spellings of a word
@ -110,7 +113,7 @@ function pspell_check(int $dictionary, string $word): bool {}
* </p>
* @return array|false an array of possible spellings.
*/
function pspell_suggest(int $dictionary, string $word): array|false {}
function pspell_suggest(Dictionary $dictionary, string $word): array|false {}
/**
* Store a replacement pair for a word
@ -127,7 +130,7 @@ function pspell_suggest(int $dictionary, string $word): array|false {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_store_replacement(int $dictionary, string $misspelled, string $correct): bool {}
function pspell_store_replacement(Dictionary $dictionary, string $misspelled, string $correct): bool {}
/**
* Add the word to a personal wordlist
@ -138,7 +141,7 @@ function pspell_store_replacement(int $dictionary, string $misspelled, string $c
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_add_to_personal(int $dictionary, string $word): bool {}
function pspell_add_to_personal(Dictionary $dictionary, string $word): bool {}
/**
* Add the word to the wordlist in the current session
@ -149,7 +152,7 @@ function pspell_add_to_personal(int $dictionary, string $word): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_add_to_session(int $dictionary, string $word): bool {}
function pspell_add_to_session(Dictionary $dictionary, string $word): bool {}
/**
* Clear the current session
@ -157,7 +160,7 @@ function pspell_add_to_session(int $dictionary, string $word): bool {}
* @param int $dictionary
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_clear_session(int $dictionary): bool {}
function pspell_clear_session(Dictionary $dictionary): bool {}
/**
* Save the personal wordlist to a file
@ -168,7 +171,7 @@ function pspell_clear_session(int $dictionary): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_save_wordlist(int $dictionary): bool {}
function pspell_save_wordlist(Dictionary $dictionary): bool {}
/**
* Create a config used to open a dictionary
@ -195,9 +198,9 @@ function pspell_save_wordlist(int $dictionary): bool {}
* 32'. This parameter is largely untested, so be careful when
* using.
* </p>
* @return int Retuns a pspell config identifier.
* @return Config Retuns a pspell config identifier.
*/
function pspell_config_create(string $language, string $spelling = '', string $jargon = '', string $encoding = ''): int {}
function pspell_config_create(string $language, string $spelling = '', string $jargon = '', string $encoding = ''): Config {}
/**
* Consider run-together words as valid compounds
@ -209,7 +212,7 @@ function pspell_config_create(string $language, string $spelling = '', string $j
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_runtogether(int $config, bool $allow): bool {}
function pspell_config_runtogether(Config $config, bool $allow): bool {}
/**
* Change the mode number of suggestions returned
@ -222,7 +225,7 @@ function pspell_config_runtogether(int $config, bool $allow): bool {}
* suggestions)</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_mode(int $config, int $mode): bool {}
function pspell_config_mode(Config $config, int $mode): bool {}
/**
* Ignore words less than N characters long
@ -233,7 +236,7 @@ function pspell_config_mode(int $config, int $mode): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_ignore(int $config, int $min_length): bool {}
function pspell_config_ignore(Config $config, int $min_length): bool {}
/**
* Set a file that contains personal wordlist
@ -245,7 +248,7 @@ function pspell_config_ignore(int $config, int $min_length): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_personal(int $config, string $filename): bool {}
function pspell_config_personal(Config $config, string $filename): bool {}
/**
* Location of the main word list
@ -254,7 +257,7 @@ function pspell_config_personal(int $config, string $filename): bool {}
* @param string $directory
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_dict_dir(int $config, string $directory): bool {}
function pspell_config_dict_dir(Config $config, string $directory): bool {}
/**
* location of language data files
@ -263,7 +266,7 @@ function pspell_config_dict_dir(int $config, string $directory): bool {}
* @param string $directory
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_data_dir(int $config, string $directory): bool {}
function pspell_config_data_dir(Config $config, string $directory): bool {}
/**
* Set a file that contains replacement pairs
@ -274,7 +277,7 @@ function pspell_config_data_dir(int $config, string $directory): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_repl(int $config, string $filename): bool {}
function pspell_config_repl(Config $config, string $filename): bool {}
/**
* Determine whether to save a replacement pairs list
@ -286,4 +289,4 @@ function pspell_config_repl(int $config, string $filename): bool {}
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function pspell_config_save_repl(int $config, bool $save): bool {}
function pspell_config_save_repl(Config $config, bool $save): bool {}

14
pspell/pspell_c.php Normal file
View File

@ -0,0 +1,14 @@
<?php
namespace PSpell;
/**
* A fully opaque class which replaces a pspell resource as of PHP 8.1.0.
* @since 8.1
*/
final class Dictionary {}
/**
* A fully opaque class which replaces a pspell config resource as of PHP 8.1.0.
* @since 8.1
*/
final class Config {}

View File

@ -191,7 +191,7 @@ function session_destroy(): bool {}
/**
* Free all session variables
* @link https://php.net/manual/en/function.session-unset.php
* @return bool since 7.2.0 returns true on success or false on failure.
* @return void|bool since 7.2.0 returns true on success or false on failure.
*/
function session_unset(): bool {}
@ -375,7 +375,7 @@ function session_set_cookie_params(array $lifetime_or_options): bool {}
* httponly
* flag when setting the session cookie.
* </p>
* @return bool since 7.2.0 returns true on success or false on failure.
* @return void|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): bool {}
@ -401,7 +401,7 @@ function session_get_cookie_params(): array {}
/**
* Write session data and end session
* @link https://php.net/manual/en/function.session-write-close.php
* @return bool since 7.2.0 returns true on success or false on failure.
* @return void|bool since 7.2.0 returns true on success or false on failure.
*/
function session_write_close(): bool {}
@ -427,7 +427,7 @@ 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 bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @return void|bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @since 5.6
*/
function session_abort(): bool {}
@ -436,7 +436,7 @@ 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 bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @return void|bool since 7.2.0 returns true if a session was successfully reinitialized or false on failure.
* @since 5.6
*/
function session_reset(): bool {}

View File

@ -973,32 +973,32 @@ class SoapFault extends Exception
/**
* @var string
*/
public $faultcode;
public string|null $faultcode;
/**
* @var string
*/
public $faultstring;
public string $faultstring;
/**
* @var string
*/
public $faultactor;
public string|null $faultactor;
/**
* @var mixed
*/
public $detail;
public mixed $detail;
/**
* @var string
*/
public $faultname;
public string $faultname;
/**
* @var mixed
*/
public $headerfault;
public mixed $headerfault;
/**
* @var string|null

View File

@ -104,6 +104,11 @@ define('SOL_SOCKET', 1);
define('SOMAXCONN', 128);
/**
* @since 8.1
*/
define('SO_MARK', 36);
/**
* Used to disable Nagle TCP algorithm.
* Added in PHP 5.2.7.
@ -874,6 +879,11 @@ define('AI_V4MAPPED', 8);
define('AI_ALL', 16);
/**
* @since 8.1
*/
define('TCP_DEFER_ACCEPT', 9);
/**
* (PHP 7 >= 7.2.0)<br/>
* Get array with contents of getaddrinfo about the given hostname.
@ -896,10 +906,10 @@ function socket_addrinfo_lookup(string $host, ?string $service, array $hints = [
* 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 AddressInfo $address <p>
* @param resource|AddressInfo $address <p>
* Resource created from {@see socket_addrinfo_lookup()}
* </p>
* @return Socket|false Socket resource on success or false on failure.
* @return resource|Socket|null|false Socket resource on success or NULL on failure.
* @since 7.2
*/
function socket_addrinfo_connect(AddressInfo $address): Socket|false {}
@ -909,10 +919,10 @@ function socket_addrinfo_connect(AddressInfo $address): Socket|false {}
* 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 AddressInfo $address <p>
* @param resource|AddressInfo $address <p>
* Resource created from {@see socket_addrinfo_lookup()}
* </p>
* @return Socket|false Socket resource on success or false on failure.
* @return resource|Socket|null|false Socket resource on success or NULL on failure.
* @since 7.2
*/
function socket_addrinfo_bind(AddressInfo $address): Socket|false {}
@ -921,7 +931,7 @@ function socket_addrinfo_bind(AddressInfo $address): Socket|false {}
* (PHP 7 >= 7.2.0)<br/>
* Get information about addrinfo
* @link https://www.php.net/manual/en/function.socket-addrinfo-explain.php
* @param AddressInfo $address <p>
* @param resource|AddressInfo $address <p>
* Resource created from {@see socket_addrinfo_lookup()}
* </p>
* @return array containing the fields in the addrinfo structure.
@ -1110,7 +1120,7 @@ function socket_select(?array &$read, ?array &$write, ?array &$except, ?int $sec
* </td>
* </tr>
* </table>
* @return Socket|false <b>socket_create</b> returns a socket resource on success,
* @return resource|Socket|false <b>socket_create</b> returns a socket resource on success,
* or <b>FALSE</b> on error. The actual error code can be retrieved by calling
* <b>socket_last_error</b>. This error code may be passed to
* <b>socket_strerror</b> to get a textual explanation of the
@ -1119,10 +1129,10 @@ function socket_select(?array &$read, ?array &$write, ?array &$except, ?int $sec
function socket_create(int $domain, int $type, int $protocol): Socket|false {}
/**
* @param Socket $socket
* @return Socket|false
* @param resource|Socket $socket
* @return resource|Socket|false
*/
function socket_export_stream(Socket $socket): Socket|false {}
function socket_export_stream(Socket $socket) {}
/**
* Opens a socket on port to accept connections
@ -1137,7 +1147,7 @@ function socket_export_stream(Socket $socket): Socket|false {}
* <i>backlog</i> parameter, see
* <b>socket_listen</b> for more information.
* </p>
* @return Socket|false <b>socket_create_listen</b> returns a new socket resource
* @return resource|Socket|false <b>socket_create_listen</b> returns a new socket resource
* on success or <b>FALSE</b> on error. The error code can be retrieved with
* <b>socket_last_error</b>. This code may be passed to
* <b>socket_strerror</b> to get a textual explanation of the
@ -1181,10 +1191,10 @@ function socket_create_pair(int $domain, int $type, int $protocol, &$pair): bool
/**
* Accepts a connection on a socket
* @link https://php.net/manual/en/function.socket-accept.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @return Socket|false a new socket resource on success, or <b>FALSE</b> on error. The actual
* @return resource|Socket|false a new socket resource on success, or <b>FALSE</b> on error. The actual
* error code can be retrieved by calling
* <b>socket_last_error</b>. This error code may be passed to
* <b>socket_strerror</b> to get a textual explanation of the
@ -1195,7 +1205,7 @@ function socket_accept(Socket $socket): Socket|false {}
/**
* Sets nonblocking mode for file descriptor fd
* @link https://php.net/manual/en/function.socket-set-nonblock.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1206,7 +1216,7 @@ function socket_set_nonblock(Socket $socket): bool {}
/**
* Sets blocking mode on a socket resource
* @link https://php.net/manual/en/function.socket-set-block.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1217,7 +1227,7 @@ function socket_set_block(Socket $socket): bool {}
/**
* Listens for a connection on a socket
* @link https://php.net/manual/en/function.socket-listen.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @param int $backlog [optional] <p>
@ -1246,7 +1256,7 @@ function socket_listen(Socket $socket, int $backlog = 0): bool {}
/**
* Closes a socket resource
* @link https://php.net/manual/en/function.socket-close.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1257,7 +1267,7 @@ function socket_close(Socket $socket): void {}
/**
* Write to a socket
* @link https://php.net/manual/en/function.socket-write.php
* @param Socket $socket
* @param resource|Socket $socket
* @param string $data <p>
* The buffer to be written.
* </p>
@ -1284,7 +1294,7 @@ function socket_write(Socket $socket, string $data, ?int $length = null): int|fa
/**
* Reads a maximum of length bytes from a socket
* @link https://php.net/manual/en/function.socket-read.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1315,7 +1325,7 @@ function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ):
/**
* 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 Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1346,7 +1356,7 @@ function socket_getsockname(Socket $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 Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1379,7 +1389,7 @@ function socket_getpeername(Socket $socket, &$address, &$port = null): bool {}
/**
* Initiates a connection on a socket
* @link https://php.net/manual/en/function.socket-connect.php
* @param Socket $socket
* @param resource|Socket $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
@ -1421,7 +1431,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 Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @param string $address <p>
@ -1451,7 +1461,7 @@ function socket_bind(Socket $socket, string $address, int $port = 0): bool {}
/**
* Receives data from a connected socket
* @link https://php.net/manual/en/function.socket-recv.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* The <i>socket</i> must be a socket resource previously
* created by socket_create().
* </p>
@ -1515,7 +1525,7 @@ function socket_recv(Socket $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 Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -1568,7 +1578,7 @@ function socket_send(Socket $socket, string $data, int $length, int $flags): int
* (PHP 5 >=5.5.0)<br/>
* Send a message
* @link https://secure.php.net/manual/en/function.socket-sendmsg.php
* @param Socket $socket
* @param resource|Socket $socket
* @param array $message
* @param int $flags
* @return int|false
@ -1579,7 +1589,7 @@ function socket_sendmsg(Socket $socket, array $message, int $flags = 0): int|fal
/**
* Receives data from a socket whether or not it is connection-oriented
* @link https://php.net/manual/en/function.socket-recvfrom.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* The <i>socket</i> must be a socket resource previously
* created by socket_create().
* </p>
@ -1653,7 +1663,7 @@ function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$addr
/**
* Read a message
* @link https://secure.php.net/manual/en/function.socket-recvmsg.php
* @param Socket $socket
* @param resource|Socket $socket
* @param array &$message
* @param int $flags
* @return int|false
@ -1664,7 +1674,7 @@ function socket_recvmsg(Socket $socket, array &$message, int $flags = 0): int|fa
/**
* Sends a message to a socket, whether it is connected or not
* @link https://php.net/manual/en/function.socket-sendto.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created using <b>socket_create</b>.
* </p>
* @param string $data <p>
@ -1723,7 +1733,7 @@ function socket_sendto(Socket $socket, string $data, int $length, int $flags, st
/**
* Gets socket options for the socket
* @link https://php.net/manual/en/function.socket-get-option.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -2089,7 +2099,7 @@ function socket_get_option(Socket $socket, int $level, int $option): array|int|f
/**
* Sets socket options for the socket
* @link https://php.net/manual/en/function.socket-set-option.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>
* or <b>socket_accept</b>.
* </p>
@ -2116,7 +2126,7 @@ function socket_set_option(Socket $socket, int $level, int $option, $value): boo
/**
* Shuts down a socket for receiving, sending, or both
* @link https://php.net/manual/en/function.socket-shutdown.php
* @param Socket $socket <p>
* @param resource|Socket $socket <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @param int $mode [optional] <p>
@ -2150,7 +2160,7 @@ function socket_shutdown(Socket $socket, int $mode = 2): bool {}
/**
* Returns the last error on the socket
* @link https://php.net/manual/en/function.socket-last-error.php
* @param Socket $socket [optional] <p>
* @param resource|Socket $socket [optional] <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @return int This function returns a socket error code.
@ -2160,7 +2170,7 @@ function socket_last_error(?Socket $socket = null): int {}
/**
* Clears the error on the socket or the last error code
* @link https://php.net/manual/en/function.socket-clear-error.php
* @param Socket|null $socket [optional] <p>
* @param resource|Socket|null $socket [optional] <p>
* A valid socket resource created with <b>socket_create</b>.
* </p>
* @return void No value is returned.
@ -2170,10 +2180,10 @@ function socket_clear_error(?Socket $socket = null): void {}
/**
* Import a stream
* @link https://php.net/manual/en/function.socket-import-stream.php
* @param Socket $stream <p>
* @param resource|Socket $stream <p>
* The stream resource to import.
* </p>
* @return Socket|false|null <b>FALSE</b> or <b>NULL</b> on failure.
* @return resource|Socket|false|null <b>FALSE</b> or <b>NULL</b> on failure.
* @since 5.4
*/
function socket_import_stream($stream): Socket|false {}
@ -2212,7 +2222,7 @@ function socket_setopt(Socket $socket, int $level, int $option, $value): bool {}
*
* @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-export.php
*
* @param Socket $socket
* @param resource|Socket $socket
* @param int $target_pid
* @return string|false
*
@ -2226,7 +2236,7 @@ function socket_wsaprotocol_info_export($socket, $target_pid) {}
* @link https://www.php.net/manual/en/function.socket-wsaprotocol-info-import.php
*
* @param string $info_id
* @return Socket|false
* @return resource|Socket|false
*
* @since 7.3
*/

View File

@ -172,7 +172,7 @@ define('SODIUM_CRYPTO_PWHASH_ALG_DEFAULT', 2);
define('SODIUM_CRYPTO_PWHASH_SALTBYTES', 16);
define('SODIUM_CRYPTO_PWHASH_STRPREFIX', '$argon2id$');
define('SODIUM_CRYPTO_PWHASH_STRPREFIX', "$argon2id$");
define('SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES', 24);
@ -190,6 +190,42 @@ define('SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES', 32);
define('SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES', 64);
function sodium_crypto_core_ristretto255_add(string $p, string $q): string {}
function sodium_crypto_core_ristretto255_from_hash(string $s): string {}
function sodium_crypto_core_ristretto255_is_valid_point(string $s): bool {}
function sodium_crypto_core_ristretto255_random(): string {}
function sodium_crypto_core_ristretto255_scalar_add(string $x, string $y): string {}
function sodium_crypto_core_ristretto255_scalar_complement(string $s): string {}
function sodium_crypto_core_ristretto255_scalar_invert(string $s): string {}
function sodium_crypto_core_ristretto255_scalar_mul(string $x, string $y): string {}
function sodium_crypto_core_ristretto255_scalar_negate(string $s): string {}
function sodium_crypto_core_ristretto255_scalar_reduce(string $s): string {}
function sodium_crypto_core_ristretto255_scalar_sub(string $x, string $y): string {}
function sodium_crypto_core_ristretto255_scalar_random(): string {}
function sodium_crypto_core_ristretto255_sub(string $p, string $q): string {}
function sodium_crypto_scalarmult_ristretto255(string $n, string $p): string {}
function sodium_crypto_scalarmult_ristretto255_base(string $n): string {}
function sodium_crypto_stream_xchacha20(int $length, string $nonce, string $key): string {}
function sodium_crypto_stream_xchacha20_xor(string $message, string $nonce, string $key): string {}
function sodium_crypto_stream_xchacha20_keygen(): string {}
/**
* Can you access AES-256-GCM? This is only available if you have supported
* hardware.

View File

@ -1,14 +1,15 @@
<?php
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\TentativeType;
/**
* Specifies that the <b>Sqlite3Result::fetchArray</b>
* method shall return an array indexed by column name as returned in the
* corresponding result set.
* @link https://php.net/manual/en/sqlite3.constants.php
*/
use JetBrains\PhpStorm\ArrayShape;
use JetBrains\PhpStorm\Internal\TentativeType;
define('SQLITE3_ASSOC', 1);
/**

View File

@ -1,8 +1,5 @@
<?php
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;
/**
* The full path and filename of the file. If used inside an include,
* the name of the included file is returned.
@ -11,6 +8,10 @@ use JetBrains\PhpStorm\Pure;
* under some circumstances.
* @link https://php.net/manual/en/language.constants.predefined.php
*/
use JetBrains\PhpStorm\Deprecated;
use JetBrains\PhpStorm\Pure;
define('__FILE__', "");
/**

View File

@ -105,7 +105,7 @@ define('PASSWORD_ARGON2_PROVIDER', "standard");
* Returns information about the given hash
* @link https://secure.php.net/manual/en/function.password-get-info.php
* @param string $hash A hash created by password_hash().
* @return array Returns an associative array with three elements:
* @return array|null Returns an associative array with three elements:
* <ul>
* <li>
* <em>algo</em>, which will match a
@ -138,7 +138,7 @@ function password_get_info(string $hash): array {}
* The salt option has been deprecated as of PHP 7.0.0. It is now
* preferred to simply use the salt that is generated by default.
* </p>
* @return string Returns the hashed password
* @return string|false|null Returns the hashed password, or FALSE on failure, or null if the algorithm is invalid
* @since 5.5
*/
function password_hash(string $password, string|int|null $algo, array $options = []): string {}

View File

@ -35,7 +35,7 @@ function bin2hex(string $string): string {}
* @param int $seconds <p>
* Halt time in seconds.
* </p>
* @return int zero on success. If the call was interrupted
* @return int|false zero on success, or false on errors. If the call was interrupted
* by a signal, sleep returns the number of seconds left
* to sleep.
*/
@ -1278,8 +1278,8 @@ class __PHP_Incomplete_Class
class php_user_filter
{
public $filtername;
public $params;
public string $filtername;
public mixed $params;
public $stream;
/**
@ -1352,14 +1352,25 @@ class Directory
*/
public $path;
/**
* @var string The directory that was opened.
*/
public readonly string $path;
/**
* @var resource Can be used with other directory functions such as {@see readdir()}, {@see rewinddir()} and {@see closedir()}.
*/
public $handle;
/**
* @var resource Can be used with other directory functions such as {@see readdir()}, {@see rewinddir()} and {@see closedir()}.
*/
public readonly mixed $handle;
/**
* Close directory handle.
* Same as closedir(), only dir_handle defaults to $this.
* @param resource $dir_handle [optional]
* @link https://secure.php.net/manual/en/directory.close.php
*/
#[TentativeType]
@ -1368,6 +1379,7 @@ class Directory
/**
* Rewind directory handle.
* Same as rewinddir(), only dir_handle defaults to $this.
* @param resource $dir_handle [optional]
* @link https://secure.php.net/manual/en/directory.rewind.php
*/
#[TentativeType]
@ -1376,6 +1388,7 @@ class Directory
/**
* Read entry from directory handle.
* Same as readdir(), only dir_handle defaults to $this.
* @param resource $dir_handle [optional]
* @return string|false
* @link https://secure.php.net/manual/en/directory.read.php
*/

View File

@ -389,11 +389,17 @@ function str_word_count(string $string, int $format = 0, ?string $characters): a
* @param int $length [optional] <p>
* Maximum length of the chunk.
* </p>
* @return string[] <p>If the optional split_length parameter is
* @return string[]|false <p>If the optional split_length parameter is
* specified, the returned array will be broken down into chunks with each
* being split_length in length, otherwise each chunk
* will be one character in length.
* </p>
* <p>
* <b>FALSE</b> is returned if split_length is less than 1.
* If the split_length length exceeds the length of
* string, the entire string is returned as the first
* (and only) array element.
* </p>
*/
#[Pure]
function str_split(string $string, int $length = 1): array {}
@ -541,7 +547,7 @@ function money_format(string $format, float $number): ?string {}
* $rest = substr("abcdef", -3, -1); // returns "de"
* ?>
* </pre>
* @return string the extracted part of string.
* @return string|false the extracted part of string or false on failure.
*/
#[Pure]
function substr(string $string, int $offset, ?int $length): string {}
@ -968,7 +974,8 @@ function similar_text(string $string1, string $string2, &$percent): int {}
* <p>
* If the limit parameter is zero, then this is treated as 1.
* </p>
* @return string[]
* @return string[]|false If delimiter is an empty string (""),
* explode will return false.
* If delimiter contains a value that is not
* contained in string and a negative
* limit is used, then an empty array will be

View File

@ -834,8 +834,8 @@ function proc_terminate($process, int $signal = 15): bool {}
* The proc_open resource that will
* be evaluated.
* </p>
* @return array An array of collected information on success.
* The returned array contains the following elements:
* @return array|false An array of collected information on success, and false
* on failure. The returned array contains the following elements:
* </p>
* <p>
* <tr valign="top"><td>element</td><td>type</td><td>description</td></tr>

View File

@ -85,7 +85,7 @@ function abs(int|float $num): int|float {}
* @param int|float $num <p>
* The value to round
* </p>
* @return float value rounded up to the next highest
* @return float|false value rounded up to the next highest
* integer.
* The return value of ceil is still of type
* float as the value range of float is
@ -100,7 +100,7 @@ function ceil(int|float $num): float {}
* @param int|float $num <p>
* The numeric value to round
* </p>
* @return float value rounded to the next lowest integer.
* @return float|false value rounded to the next lowest integer.
* The return value of floor is still of type
* float because the value range of float is
* usually bigger than that of integer.

View File

@ -445,7 +445,7 @@ function ini_get_all(?string $extension, bool $details = true): array|false {}
* </p>
* @return string|false the old value on success, false on failure.
*/
function ini_set(string $option, string $value): string|false {}
function ini_set(string $option, string|int|float|bool|null $value): string|false {}
/**
* Alias:
@ -456,7 +456,7 @@ function ini_set(string $option, string $value): string|false {}
* @param string $value
* @return string|false
*/
function ini_alter(string $option, string $value): string|false {}
function ini_alter(string $option, string|int|float|bool|null $value): string|false {}
/**
* Restores the value of a configuration option

View File

@ -707,7 +707,8 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $
* Output all remaining data on a file pointer
* @link https://php.net/manual/en/function.fpassthru.php
* @param resource $stream The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
* @return int returns
* @return int|false If an error occurs, fpassthru returns
* false. Otherwise, fpassthru returns
* the number of characters read from handle
* and passed through to the output.
*/
@ -801,6 +802,20 @@ function ftell($stream): int|false {}
*/
function fflush($stream): bool {}
/**
* Sync file to storage. Similar to fflush() but blocks until OS buffers have flushed.
* @param resource $stream
* @since 8.1
*/
function fsync($stream): bool {}
/**
* Sync file data only to storage. Similar to fsync but does not flush modified metadata. POSIX only, aliased to fsync on Win32.
* @param resource $stream
* @since 8.1
*/
function fdatasync($stream): bool {}
/**
* Binary-safe file write
* @link https://php.net/manual/en/function.fwrite.php

View File

@ -77,7 +77,7 @@ use JetBrains\PhpStorm\Pure;
* is returned and a warning raised (this can happen if the system call is
* interrupted by an incoming signal).
*/
function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds): int|false {}
function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int|null $microseconds): int|false {}
/**
* Create a stream context
@ -605,12 +605,17 @@ function stream_supports_lock($stream): bool {}
* @param string $escape [optional] <p>
* Set the escape character (one character only). Defaults as a backslash.
* </p>
* @return array|false an indexed array containing the fields read.
* @return array|false|null an indexed array containing the fields read.
* <p>
* A blank line in a CSV file will be returned as an array
* comprising a single null field, and will not be treated
* as an error.
* </p>
* <p>
* fgetcsv returns null if an invalid
* handle is supplied or false on other errors,
* including end of file.
* </p>
*/
function fgetcsv($stream, ?int $length = null, string $separator = ',', string $enclosure = '"', string $escape = "\\"): array|false {}
@ -634,7 +639,7 @@ function fgetcsv($stream, ?int $length = null, string $separator = ',', string $
* </p>
* @return int|false the length of the written string or false on failure.
*/
function fputcsv($stream, array $fields, string $separator = ',', string $enclosure = '"', string $escape = "\\"): int|false {}
function fputcsv($stream, array $fields, string $separator = ',', string $enclosure = '"', string $escape = "\\", string $eol = PHP_EOL): int|false {}
/**
* Portable advisory file locking

View File

@ -163,7 +163,7 @@ function pfsockopen(string $hostname, int $port = -1, &$error_code, &$error_mess
* </p>
* @param mixed ...$values <p>
* </p>
* @return string a binary string containing data
* @return string|false a binary string containing data or false if the format string contains errors
*/
#[Pure]
function pack(string $format, mixed ...$values): string {}

View File

@ -105,7 +105,8 @@ function getimagesizefromstring(string $string, &$image_info): array|false {}
* Set the stream chunk size.
* @param resource $stream The target stream.
* @param int $size The desired new chunk size.
* @return int Returns the previous chunk size on success.
* @return int|false Returns the previous chunk size on success.<br>
* Will return <b>FALSE</b> if chunk_size is less than 1 or greater than <b>PHP_INT_MAX</b>.
* @link https://secure.php.net/manual/en/function.stream-set-chunk-size.php
* @since 5.4
*/
@ -130,7 +131,7 @@ function define_syslog_variables() {}
* This parameter restricts the returned metaphone key to phonemes characters in length.
* The default value of 0 means no restriction.
* </p>
* @return string the metaphone key as a string
* @return string|false the metaphone key as a string, or FALSE on failure
*/
#[Pure]
function metaphone(string $string, int $max_phonemes = 0): string {}

View File

@ -746,6 +746,16 @@ function array_key_first(array $array): string|int|null {}
#[Pure]
function array_key_last(array $array): string|int|null {}
/**
* @link https://secure.php.net/array_is_list
* @param array $array An array
* @return bool return true if the array keys are 0 .. count($array)-1 in that order.
* For other arrays, it returns false. For non-arrays, it throws a TypeError.
* @since 8.1
*/
#[Pure]
function array_is_list(array $array): bool {}
/**
* Alias:
* {@see current}
@ -862,7 +872,16 @@ function assert_options(int $option, mixed $value): mixed {}
* </p>
* @param string|null $operator [optional] <p>
* If you specify the third optional operator
* argument, you can test for a particular relationship.</p>
* argument, you can test for a particular relationship. The
* possible operators are: &lt;,
* lt, &lt;=,
* le, &gt;,
* gt, >=,
* ge, ==,
* =, eq,
* !=, &lt;&gt;,
* ne respectively.
* </p>
* <p>
* This parameter is case-sensitive, so values should be lowercase.
* </p>

View File

@ -137,12 +137,12 @@ define('M_SQRT3', 1.7320508075689);
/**
* The infinite
*/
define('INF', (float)INF);
define('INF', "INF");
/**
* Not A Number
*/
define('NAN', (float)NAN);
define('NAN', "NAN");
/**
* Round halves up
@ -1164,6 +1164,11 @@ define('IMAGETYPE_UNKNOWN', 0);
define('IMAGETYPE_COUNT', 20);
/**
* @since 8.1
*/
define('IMAGETYPE_AVIF', 19);
/**
* IPv4 Address Resource
* @link https://php.net/manual/en/network.constants.php

View File

@ -22,14 +22,14 @@ define('MSG_EXCEPT', 4);
* Queue permissions. Default to 0666. If the message queue already
* exists, the <i>perms</i> will be ignored.
* </p>
* @return SysvMessageQueue|false a resource handle that can be used to access the System V message queue.
* @return resource|SysvMessageQueue|false a resource handle that can be used to access the System V message queue.
*/
function msg_get_queue(int $key, int $permissions = 438): SysvMessageQueue|false {}
/**
* Send a message to a message queue
* @link https://php.net/manual/en/function.msg-send.php
* @param SysvMessageQueue $queue
* @param SysvMessageQueue|resource $queue
* @param int $message_type
* @param mixed $message
* @param bool $serialize [optional] <p>

View File

@ -14,7 +14,7 @@
* @param int $permissions [optional] <p>
* The optional permission bits. Default to 0666.
* </p>
* @return SysvSharedMemory|false a shared memory segment identifier.
* @return resource|SysvSharedMemory|false a shared memory segment identifier.
*/
function shm_attach(int $key, ?int $size, int $permissions = 438): SysvSharedMemory|false {}

View File

@ -211,7 +211,10 @@ class StubsTypeHintsTest extends AbstractBaseStubsTestCase
// replace array notations like int[] or array<string,mixed> to match the array type
return preg_replace(['/\w+\[]/', '/array<[a-z,\s]+>/'], 'array', $typeName);
}, $method->returnTypesFromPhpDoc);
$unifiedSignatureTypes = $method->returnTypesFromSignature;
$unifiedSignatureTypes = array_map(function (string $type) {
$typeParts = explode('\\', $type);
return end($typeParts);
}, $method->returnTypesFromSignature);
if (count($unifiedSignatureTypes) === 1) {
$type = array_pop($unifiedSignatureTypes);
if (str_contains($type, '?')) {

View File

@ -221,6 +221,11 @@ define('T_TRAIT', 334);
define('T_INTERFACE', 335);
/**
* @since 8.1
*/
define('T_ENUM', 336);
define('T_EXTENDS', 337);
define('T_IMPLEMENTS', 338);
@ -314,6 +319,21 @@ define('T_ATTRIBUTE', 351);
*/
define('T_NULLSAFE_OBJECT_OPERATOR', 385);
/**
* @since 8.1
*/
define('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', 403);
/**
* @since 8.1
*/
define('T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', 404);
/**
* @since 8.1
*/
define('T_READONLY', 327);
/**
* @removed 7.0
*/

View File

@ -77,7 +77,7 @@ define('XML_SAX_IMPL', "libxml");
* encodings are ISO-8859-1, UTF-8 and
* US-ASCII.
* </p>
* @return XMLParser a resource handle for the new XML parser.
* @return resource|false|XMLParser a resource handle for the new XML parser.
*/
#[Pure]
function xml_parser_create(?string $encoding): XMLParser {}
@ -101,7 +101,7 @@ function xml_parser_create(?string $encoding): XMLParser {}
* handler functions will consist of namespace and tag name separated by
* the string specified in <i>separator</i>.
* </p>
* @return XMLParser a resource handle for the new XML parser.
* @return resource|false|XMLParser a resource handle for the new XML parser.
*/
#[Pure]
function xml_parser_create_ns(?string $encoding, string $separator = ':'): XMLParser {}

View File

@ -9,7 +9,7 @@ use JetBrains\PhpStorm\Internal\TentativeType;
* @param string $uri <p>
* The URI of the resource for the output.
* </p>
* @return false|XMLWriter Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @return false|resource|XMLWriter Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
* <p>
* Procedural style: Returns a new xmlwriter resource for later use with the
* xmlwriter functions on success, <b>FALSE</b> on error.
@ -21,7 +21,7 @@ function xmlwriter_open_uri(string $uri): XMLWriter|false {}
* (PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)<br/>
* Create new xmlwriter using memory for string output
* @link https://php.net/manual/en/function.xmlwriter-openmemory.php
* @return XMLWriter|false Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @return XMLWriter|false|resource Object oriented style: Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
* <p>
* Procedural style: Returns a new xmlwriter resource for later use with the
* xmlwriter functions on success, <b>FALSE</b> on error.

View File

@ -725,36 +725,36 @@ class ZipArchive implements Countable
* Status of the Zip Archive
* @var int
*/
public $status;
public int $status;
/**
* System status of the Zip Archive
* @var int
*/
public $statusSys;
public int $statusSys;
/**
* Number of files in archive
* @var int
*/
public $numFiles;
public int $numFiles;
/**
* File name in the file system
* @var string
*/
public $filename;
public string $filename;
/**
* Comment for the archive
* @var string
*/
public $comment;
public string $comment;
/**
* @var int
*/
public $lastId;
public int $lastId;
public static function isEncryptionMethodSupported(int $method, bool $enc = true) {}