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

This commit is contained in:
Ivan Fedorov 2022-11-02 13:44:30 +01:00 committed by Ivan Fedorov
parent e764dfca0a
commit a0b2f055eb
36 changed files with 2088 additions and 8 deletions

View File

@ -383,6 +383,16 @@ function method_exists($object_or_class, string $method): bool {}
#[Pure]
function property_exists($object_or_class, string $property): bool {}
/**
* Checks if the trait exists
* @param string $trait Name of the trait to check
* @param bool $autoload [optional] Whether to autoload if not already loaded.
* @return bool Returns TRUE if trait exists, FALSE if not, NULL in case of an error.
* @link https://secure.php.net/manual/en/function.trait-exists.php
* @since 5.4
*/
function trait_exists(string $trait, bool $autoload = true): bool {}
/**
* Checks if the class has been defined
* @link https://php.net/manual/en/function.class-exists.php
@ -658,6 +668,16 @@ function get_declared_classes(): array {}
#[Pure(true)]
function get_declared_interfaces(): array {}
/**
* Returns an array of all declared traits
* @return array with names of all declared traits in values. Returns NULL in case of a failure.
* @link https://secure.php.net/manual/en/function.get-declared-traits.php
* @see class_uses()
* @since 5.4
*/
#[Pure(true)]
function get_declared_traits(): array {}
/**
* Returns an array of all defined functions
* @link https://php.net/manual/en/function.get-defined-functions.php

View File

@ -301,6 +301,15 @@ class Exception
#[TentativeType]
public function __wakeup(): void {}
/**
* Clone the exception
* Tries to clone the Exception, which results in Fatal error.
* @link https://php.net/manual/en/exception.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
}
class ValueError {}

View File

@ -20,6 +20,7 @@ const CLASSES = array (
'BadMethodCallException' => 'SPL/SPL.php',
'CURLFile' => 'curl/curl.php',
'CachingIterator' => 'SPL/SPL.php',
'CallbackFilterIterator' => 'SPL/SPL.php',
'ClosedGeneratorException' => 'standard/_types.php',
'Closure' => 'Core/Core_c.php',
'Collator' => 'intl/intl.php',
@ -81,6 +82,7 @@ const CLASSES = array (
'IteratorAggregate' => 'Core/Core_c.php',
'IteratorIterator' => 'SPL/SPL.php',
'JsonIncrementalParser' => 'json/json.php',
'JsonSerializable' => 'json/json.php',
'LengthException' => 'SPL/SPL.php',
'LibXMLError' => 'libxml/libxml.php',
'LimitIterator' => 'SPL/SPL.php',
@ -109,6 +111,7 @@ const CLASSES = array (
'RangeException' => 'SPL/SPL.php',
'RecursiveArrayIterator' => 'SPL/SPL.php',
'RecursiveCachingIterator' => 'SPL/SPL.php',
'RecursiveCallbackFilterIterator' => 'SPL/SPL.php',
'RecursiveDirectoryIterator' => 'SPL/SPL_c1.php',
'RecursiveFilterIterator' => 'SPL/SPL.php',
'RecursiveIterator' => 'SPL/SPL.php',
@ -125,6 +128,7 @@ const CLASSES = array (
'ReflectionObject' => 'Reflection/ReflectionObject.php',
'ReflectionParameter' => 'Reflection/ReflectionParameter.php',
'ReflectionProperty' => 'Reflection/ReflectionProperty.php',
'ReflectionZendExtension' => 'Reflection/ReflectionZendExtension.php',
'Reflector' => 'Reflection/Reflector.php',
'RegexIterator' => 'SPL/SPL.php',
'ResourceBundle' => 'intl/intl.php',
@ -136,6 +140,8 @@ const CLASSES = array (
'SQLite3Stmt' => 'sqlite3/sqlite3.php',
'SeekableIterator' => 'SPL/SPL.php',
'Serializable' => 'Core/Core_c.php',
'SessionHandler' => 'session/SessionHandler.php',
'SessionHandlerInterface' => 'session/SessionHandler.php',
'SimpleXMLElement' => 'SimpleXML/SimpleXML.php',
'SimpleXMLIterator' => 'SimpleXML/SimpleXML.php',
'SoapClient' => 'soap/soap.php',
@ -160,6 +166,7 @@ const CLASSES = array (
'SplSubject' => 'SPL/SPL_c1.php',
'SplTempFileObject' => 'SPL/SPL_c1.php',
'Spoofchecker' => 'intl/intl.php',
'Transliterator' => 'intl/intl.php',
'Traversable' => 'Core/Core_c.php',
'UConverter' => 'intl/intl.php',
'UnderflowException' => 'SPL/SPL.php',
@ -322,6 +329,7 @@ const FUNCTIONS = array (
'class_exists' => 'Core/Core.php',
'class_implements' => 'SPL/SPL_f.php',
'class_parents' => 'SPL/SPL_f.php',
'class_uses' => 'SPL/SPL_f.php',
'clearstatcache' => 'standard/standard_7.php',
'closedir' => 'standard/standard_7.php',
'closelog' => 'standard/standard_8.php',
@ -670,6 +678,7 @@ const FUNCTIONS = array (
'get_current_user' => 'standard/standard_3.php',
'get_declared_classes' => 'Core/Core.php',
'get_declared_interfaces' => 'Core/Core.php',
'get_declared_traits' => 'Core/Core.php',
'get_defined_constants' => 'Core/Core.php',
'get_defined_functions' => 'Core/Core.php',
'get_defined_vars' => 'Core/Core.php',
@ -695,6 +704,7 @@ const FUNCTIONS = array (
'gethostbynamel' => 'standard/standard_4.php',
'gethostname' => 'standard/standard_4.php',
'getimagesize' => 'standard/standard_0.php',
'getimagesizefromstring' => 'standard/standard_8.php',
'getlastmod' => 'standard/standard_3.php',
'getmxrr' => 'standard/standard_4.php',
'getmygid' => 'standard/standard_2.php',
@ -770,6 +780,7 @@ const FUNCTIONS = array (
'gregoriantojd' => 'calendar/calendar.php',
'gzclose' => 'zlib/zlib.php',
'gzcompress' => 'zlib/zlib.php',
'gzdecode' => 'zlib/zlib.php',
'gzdeflate' => 'zlib/zlib.php',
'gzencode' => 'zlib/zlib.php',
'gzeof' => 'zlib/zlib.php',
@ -805,6 +816,7 @@ const FUNCTIONS = array (
'headers_sent' => 'standard/standard_4.php',
'hebrev' => 'standard/standard_1.php',
'hebrevc' => 'standard/standard_1.php',
'hex2bin' => 'standard/_standard_manual.php',
'hexdec' => 'standard/standard_3.php',
'highlight_file' => 'standard/standard_4.php',
'highlight_string' => 'standard/standard_4.php',
@ -918,6 +930,7 @@ const FUNCTIONS = array (
'imagecreatefromstring' => 'gd/gd.php',
'imagecreatefromtga' => 'gd/gd.php',
'imagecreatefromwbmp' => 'gd/gd.php',
'imagecreatefromwebp' => 'gd/gd.php',
'imagecreatefromxbm' => 'gd/gd.php',
'imagecreatefromxpm' => 'gd/gd.php',
'imagecreatetruecolor' => 'gd/gd.php',
@ -975,6 +988,7 @@ const FUNCTIONS = array (
'imagettftext' => 'gd/gd.php',
'imagetypes' => 'gd/gd.php',
'imagewbmp' => 'gd/gd.php',
'imagewebp' => 'gd/gd.php',
'imagexbm' => 'gd/gd.php',
'imap_8bit' => 'imap/imap.php',
'imap_alerts' => 'imap/imap.php',
@ -1140,6 +1154,8 @@ 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_delete' => 'ldap/ldap.php',
'ldap_dn2ufn' => 'ldap/ldap.php',
@ -1162,6 +1178,7 @@ const FUNCTIONS = array (
'ldap_mod_del' => 'ldap/ldap.php',
'ldap_mod_replace' => 'ldap/ldap.php',
'ldap_modify' => 'ldap/ldap.php',
'ldap_modify_batch' => 'ldap/ldap.php',
'ldap_next_attribute' => 'ldap/ldap.php',
'ldap_next_entry' => 'ldap/ldap.php',
'ldap_next_reference' => 'ldap/ldap.php',
@ -1182,6 +1199,7 @@ const FUNCTIONS = array (
'libxml_disable_entity_loader' => 'libxml/libxml.php',
'libxml_get_errors' => 'libxml/libxml.php',
'libxml_get_last_error' => 'libxml/libxml.php',
'libxml_set_external_entity_loader' => 'libxml/libxml.php',
'libxml_set_streams_context' => 'libxml/libxml.php',
'libxml_use_internal_errors' => 'libxml/libxml.php',
'link' => 'standard/standard_2.php',
@ -1230,6 +1248,7 @@ const FUNCTIONS = array (
'mb_ereg' => 'mbstring/mbstring.php',
'mb_ereg_match' => 'mbstring/mbstring.php',
'mb_ereg_replace' => 'mbstring/mbstring.php',
'mb_ereg_replace_callback' => 'mbstring/mbstring.php',
'mb_ereg_search' => 'mbstring/mbstring.php',
'mb_ereg_search_getpos' => 'mbstring/mbstring.php',
'mb_ereg_search_getregs' => 'mbstring/mbstring.php',
@ -1466,6 +1485,7 @@ const FUNCTIONS = array (
'mysqli_dump_debug_info' => 'mysqli/mysqli.php',
'mysqli_errno' => 'mysqli/mysqli.php',
'mysqli_error' => 'mysqli/mysqli.php',
'mysqli_error_list' => 'mysqli/mysqli.php',
'mysqli_escape_string' => 'mysqli/mysqli.php',
'mysqli_execute' => 'mysqli/mysqli.php',
'mysqli_fetch' => 'mysqli/mysqli.php',
@ -1534,6 +1554,7 @@ const FUNCTIONS = array (
'mysqli_stmt_data_seek' => 'mysqli/mysqli.php',
'mysqli_stmt_errno' => 'mysqli/mysqli.php',
'mysqli_stmt_error' => 'mysqli/mysqli.php',
'mysqli_stmt_error_list' => 'mysqli/mysqli.php',
'mysqli_stmt_execute' => 'mysqli/mysqli.php',
'mysqli_stmt_fetch' => 'mysqli/mysqli.php',
'mysqli_stmt_field_count' => 'mysqli/mysqli.php',
@ -1847,6 +1868,8 @@ const FUNCTIONS = array (
'pg_end_copy' => 'pgsql/pgsql.php',
'pg_errormessage' => 'pgsql/pgsql.php',
'pg_escape_bytea' => 'pgsql/pgsql.php',
'pg_escape_identifier' => 'pgsql/pgsql.php',
'pg_escape_literal' => 'pgsql/pgsql.php',
'pg_escape_string' => 'pgsql/pgsql.php',
'pg_exec' => 'pgsql/pgsql.php',
'pg_execute' => 'pgsql/pgsql.php',
@ -2104,6 +2127,7 @@ const FUNCTIONS = array (
'session_set_cookie_params' => 'session/session.php',
'session_set_save_handler' => 'session/session.php',
'session_start' => 'session/session.php',
'session_status' => 'session/session.php',
'session_unregister' => 'session/session.php',
'session_unset' => 'session/session.php',
'session_write_close' => 'session/session.php',
@ -2182,6 +2206,7 @@ const FUNCTIONS = array (
'socket_getopt' => 'sockets/sockets.php',
'socket_getpeername' => 'sockets/sockets.php',
'socket_getsockname' => 'sockets/sockets.php',
'socket_import_stream' => 'sockets/sockets.php',
'socket_last_error' => 'sockets/sockets.php',
'socket_listen' => 'sockets/sockets.php',
'socket_read' => 'sockets/sockets.php',
@ -2258,6 +2283,7 @@ const FUNCTIONS = array (
'stream_resolve_include_path' => 'standard/standard_6.php',
'stream_select' => 'standard/standard_6.php',
'stream_set_blocking' => 'standard/standard_6.php',
'stream_set_chunk_size' => 'standard/standard_8.php',
'stream_set_read_buffer' => 'standard/standard_6.php',
'stream_set_timeout' => 'standard/standard_6.php',
'stream_set_write_buffer' => 'standard/standard_6.php',
@ -2376,6 +2402,14 @@ const FUNCTIONS = array (
'token_get_all' => 'tokenizer/tokenizer.php',
'token_name' => 'tokenizer/tokenizer.php',
'touch' => 'standard/standard_7.php',
'trait_exists' => 'Core/Core.php',
'transliterator_create' => 'intl/intl.php',
'transliterator_create_from_rules' => 'intl/intl.php',
'transliterator_create_inverse' => 'intl/intl.php',
'transliterator_get_error_code' => 'intl/intl.php',
'transliterator_get_error_message' => 'intl/intl.php',
'transliterator_list_ids' => 'intl/intl.php',
'transliterator_transliterate' => 'intl/intl.php',
'trigger_error' => 'Core/Core.php',
'trim' => 'standard/standard_1.php',
'uasort' => 'standard/standard_8.php',
@ -2501,6 +2535,8 @@ const FUNCTIONS = array (
'zip_entry_read' => 'zip/zip.php',
'zip_open' => 'zip/zip.php',
'zip_read' => 'zip/zip.php',
'zlib_decode' => 'zlib/zlib.php',
'zlib_encode' => 'zlib/zlib.php',
'zlib_get_coding_type' => 'zlib/zlib.php',
);
@ -2713,8 +2749,12 @@ const CONSTANTS = array (
'CURLINFO_HEADER_SIZE' => 'curl/curl_d.php',
'CURLINFO_HTTP_CODE' => 'curl/curl_d.php',
'CURLINFO_LASTONE' => 'curl/curl_d.php',
'CURLINFO_LOCAL_IP' => 'curl/curl_d.php',
'CURLINFO_LOCAL_PORT' => 'curl/curl_d.php',
'CURLINFO_NAMELOOKUP_TIME' => 'curl/curl_d.php',
'CURLINFO_PRETRANSFER_TIME' => 'curl/curl_d.php',
'CURLINFO_PRIMARY_IP' => 'curl/curl_d.php',
'CURLINFO_PRIMARY_PORT' => 'curl/curl_d.php',
'CURLINFO_PRIVATE' => 'curl/curl_d.php',
'CURLINFO_REDIRECT_COUNT' => 'curl/curl_d.php',
'CURLINFO_REDIRECT_TIME' => 'curl/curl_d.php',
@ -2793,6 +2833,8 @@ const CONSTANTS = array (
'CURLOPT_MAIL_AUTH' => 'curl/curl_d.php',
'CURLOPT_MAXCONNECTS' => 'curl/curl_d.php',
'CURLOPT_MAXREDIRS' => 'curl/curl_d.php',
'CURLOPT_MAX_RECV_SPEED_LARGE' => 'curl/curl_d.php',
'CURLOPT_MAX_SEND_SPEED_LARGE' => 'curl/curl_d.php',
'CURLOPT_MUTE' => 'curl/curl_d.php',
'CURLOPT_NETRC' => 'curl/curl_d.php',
'CURLOPT_NOBODY' => 'curl/curl_d.php',
@ -3012,9 +3054,15 @@ const CONSTANTS = array (
'ENCOTHER' => 'imap/imap.php',
'ENCQUOTEDPRINTABLE' => 'imap/imap.php',
'ENT_COMPAT' => 'standard/standard_defines.php',
'ENT_DISALLOWED' => 'standard/standard_defines.php',
'ENT_HTML401' => 'standard/standard_defines.php',
'ENT_HTML5' => 'standard/standard_defines.php',
'ENT_IGNORE' => 'standard/standard_defines.php',
'ENT_NOQUOTES' => 'standard/standard_defines.php',
'ENT_QUOTES' => 'standard/standard_defines.php',
'ENT_SUBSTITUTE' => 'standard/standard_defines.php',
'ENT_XHTML' => 'standard/standard_defines.php',
'ENT_XML1' => 'standard/standard_defines.php',
'ERA' => 'standard/standard_defines.php',
'ERA_D_FMT' => 'standard/standard_defines.php',
'ERA_D_T_FMT' => 'standard/standard_defines.php',
@ -3244,7 +3292,19 @@ const CONSTANTS = array (
'IDNA_CHECK_BIDI' => 'intl/intl.php',
'IDNA_CHECK_CONTEXTJ' => 'intl/intl.php',
'IDNA_DEFAULT' => 'intl/intl.php',
'IDNA_ERROR_BIDI' => 'intl/intl.php',
'IDNA_ERROR_CONTEXTJ' => 'intl/intl.php',
'IDNA_ERROR_DISALLOWED' => 'intl/intl.php',
'IDNA_ERROR_DOMAIN_NAME_TOO_LONG' => 'intl/intl.php',
'IDNA_ERROR_EMPTY_LABEL' => 'intl/intl.php',
'IDNA_ERROR_HYPHEN_3_4' => 'intl/intl.php',
'IDNA_ERROR_INVALID_ACE_LABEL' => 'intl/intl.php',
'IDNA_ERROR_LABEL_HAS_DOT' => 'intl/intl.php',
'IDNA_ERROR_LABEL_TOO_LONG' => 'intl/intl.php',
'IDNA_ERROR_LEADING_COMBINING_MARK' => 'intl/intl.php',
'IDNA_ERROR_LEADING_HYPHEN' => 'intl/intl.php',
'IDNA_ERROR_PUNYCODE' => 'intl/intl.php',
'IDNA_ERROR_TRAILING_HYPHEN' => 'intl/intl.php',
'IDNA_NONTRANSITIONAL_TO_ASCII' => 'intl/intl.php',
'IDNA_NONTRANSITIONAL_TO_UNICODE' => 'intl/intl.php',
'IDNA_USE_STD3_RULES' => 'intl/intl.php',
@ -3348,6 +3408,9 @@ const CONSTANTS = array (
'IPPROTO_IP' => 'sockets/sockets.php',
'IPPROTO_IPV6' => 'sockets/sockets.php',
'IPV6_HOPLIMIT' => 'sockets/sockets.php',
'IPV6_MULTICAST_HOPS' => 'sockets/sockets.php',
'IPV6_MULTICAST_IF' => 'sockets/sockets.php',
'IPV6_MULTICAST_LOOP' => 'sockets/sockets.php',
'IPV6_PKTINFO' => 'sockets/sockets.php',
'IPV6_RECVHOPLIMIT' => 'sockets/sockets.php',
'IPV6_RECVPKTINFO' => 'sockets/sockets.php',
@ -3355,6 +3418,10 @@ const CONSTANTS = array (
'IPV6_TCLASS' => 'sockets/sockets.php',
'IPV6_UNICAST_HOPS' => 'sockets/sockets.php',
'IPV6_V6ONLY' => 'sockets/sockets.php',
'IP_MULTICAST_IF' => 'sockets/sockets.php',
'IP_MULTICAST_LOOP' => 'sockets/sockets.php',
'IP_MULTICAST_TTL' => 'sockets/sockets.php',
'JSON_BIGINT_AS_STRING' => 'json/json.php',
'JSON_ERROR_CTRL_CHAR' => 'json/json.php',
'JSON_ERROR_DEPTH' => 'json/json.php',
'JSON_ERROR_INF_OR_NAN' => 'json/json.php',
@ -3370,8 +3437,12 @@ const CONSTANTS = array (
'JSON_HEX_QUOT' => 'json/json.php',
'JSON_HEX_TAG' => 'json/json.php',
'JSON_NUMERIC_CHECK' => 'json/json.php',
'JSON_OBJECT_AS_ARRAY' => 'json/json.php',
'JSON_PARSER_NOTSTRICT' => 'json/json.php',
'JSON_PARTIAL_OUTPUT_ON_ERROR' => 'json/json.php',
'JSON_PRETTY_PRINT' => 'json/json.php',
'JSON_UNESCAPED_SLASHES' => 'json/json.php',
'JSON_UNESCAPED_UNICODE' => 'json/json.php',
'LATT_HASCHILDREN' => 'imap/imap.php',
'LATT_HASNOCHILDREN' => 'imap/imap.php',
'LATT_MARKED' => 'imap/imap.php',
@ -3477,6 +3548,7 @@ const CONSTANTS = array (
'LIBXML_NOXMLDECL' => 'libxml/libxml.php',
'LIBXML_NSCLEAN' => 'libxml/libxml.php',
'LIBXML_PARSEHUGE' => 'libxml/libxml.php',
'LIBXML_PEDANTIC' => 'libxml/libxml.php',
'LIBXML_SCHEMA_CREATE' => 'libxml/libxml.php',
'LIBXML_VERSION' => 'libxml/libxml.php',
'LIBXML_XINCLUDE' => 'libxml/libxml.php',
@ -3525,6 +3597,12 @@ const CONSTANTS = array (
'MB_OVERLOAD_MAIL' => 'mbstring/mbstring.php',
'MB_OVERLOAD_REGEX' => 'mbstring/mbstring.php',
'MB_OVERLOAD_STRING' => 'mbstring/mbstring.php',
'MCAST_BLOCK_SOURCE' => 'sockets/sockets.php',
'MCAST_JOIN_GROUP' => 'sockets/sockets.php',
'MCAST_JOIN_SOURCE_GROUP' => 'sockets/sockets.php',
'MCAST_LEAVE_GROUP' => 'sockets/sockets.php',
'MCAST_LEAVE_SOURCE_GROUP' => 'sockets/sockets.php',
'MCAST_UNBLOCK_SOURCE' => 'sockets/sockets.php',
'MCRYPT_3DES' => 'mcrypt/mcrypt.php',
'MCRYPT_ARCFOUR' => 'mcrypt/mcrypt.php',
'MCRYPT_ARCFOUR_IV' => 'mcrypt/mcrypt.php',
@ -4009,6 +4087,9 @@ const CONSTANTS = array (
'PHP_ROUND_HALF_ODD' => 'standard/standard_defines.php',
'PHP_ROUND_HALF_UP' => 'standard/standard_defines.php',
'PHP_SAPI' => 'Core/Core_d.php',
'PHP_SESSION_ACTIVE' => 'standard/standard_defines.php',
'PHP_SESSION_DISABLED' => 'standard/standard_defines.php',
'PHP_SESSION_NONE' => 'standard/standard_defines.php',
'PHP_SHLIB_SUFFIX' => 'Core/Core_d.php',
'PHP_SYSCONFDIR' => 'Core/Core_d.php',
'PHP_URL_FRAGMENT' => 'standard/standard_defines.php',
@ -4449,7 +4530,9 @@ const CONSTANTS = array (
'SORTTO' => 'imap/imap.php',
'SORT_ASC' => 'standard/standard_defines.php',
'SORT_DESC' => 'standard/standard_defines.php',
'SORT_FLAG_CASE' => 'standard/standard_defines.php',
'SORT_LOCALE_STRING' => 'standard/standard_defines.php',
'SORT_NATURAL' => 'standard/standard_defines.php',
'SORT_NUMERIC' => 'standard/standard_defines.php',
'SORT_REGULAR' => 'standard/standard_defines.php',
'SORT_STRING' => 'standard/standard_defines.php',
@ -5283,6 +5366,7 @@ const CONSTANTS = array (
'__LINE__' => 'standard/basic.php',
'__METHOD__' => 'standard/basic.php',
'__NAMESPACE__' => 'standard/basic.php',
'__TRAIT__' => 'standard/basic.php',
'false' => 'Core/Core_d.php',
'null' => 'Core/Core_d.php',
'true' => 'Core/Core_d.php',

View File

@ -113,6 +113,17 @@ class ReflectionClass implements Reflector
#[TentativeType]
public function isInstantiable(): bool {}
/**
* Returns whether this class is cloneable
*
* @link https://php.net/manual/en/reflectionclass.iscloneable.php
* @return bool Returns {@see true} if the class is cloneable, {@see false} otherwise.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function isCloneable(): bool {}
/**
* Gets the filename of the file in which the class has been defined
*
@ -302,6 +313,55 @@ class ReflectionClass implements Reflector
#[TentativeType]
public function isInterface(): bool {}
/**
* Returns an array of traits used by this class
*
* @link https://php.net/manual/en/reflectionclass.gettraits.php
* @return ReflectionClass[] an array with trait names in keys and
* instances of trait's {@see ReflectionClass} in values.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getTraits(): array {}
/**
* Returns an array of names of traits used by this class
*
* @link https://php.net/manual/en/reflectionclass.gettraitnames.php
* @return string[] An array with trait names in values.
* Returns {@see null} in case of an error.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getTraitNames(): array {}
/**
* Returns an array of trait aliases
*
* @link https://php.net/manual/en/reflectionclass.gettraitaliases.php
* @return string[] an array with new method names in keys and original
* names (in the format "TraitName::original") in values.
* Returns {@see null} in case of an error.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getTraitAliases(): array {}
/**
* Returns whether this is a trait
*
* @link https://php.net/manual/en/reflectionclass.istrait.php
* @return bool Returns {@see true} if this is a trait, {@see false} otherwise.
* Returns {@see null} in case of an error.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function isTrait(): bool {}
/**
* Checks if class is abstract
*
@ -356,6 +416,19 @@ class ReflectionClass implements Reflector
*/
public function newInstance(...$args) {}
/**
* Creates a new class instance without invoking the constructor.
*
* @link https://php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php
* @return T a new instance of the class.
* @throws ReflectionException if the class is an internal class that
* cannot be instantiated without invoking the constructor. In PHP 5.6.0
* onwards, this exception is limited only to internal classes that are final.
* @since 5.4
*/
#[TentativeType]
public function newInstanceWithoutConstructor(): object {}
/**
* Creates a new class instance from given arguments.
*
@ -513,4 +586,13 @@ class ReflectionClass implements Reflector
#[Pure]
#[TentativeType]
public function getShortName(): string {}
/**
* Clones object
*
* @link https://php.net/manual/en/reflectionclass.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
}

View File

@ -148,4 +148,34 @@ class ReflectionExtension implements Reflector
*/
#[TentativeType]
public function info(): void {}
/**
* Returns whether this extension is persistent
*
* @link https://php.net/manual/en/reflectionextension.ispersistent.php
* @return bool Returns {@see true} for extensions loaded by extension, {@see false} otherwise.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function isPersistent(): bool {}
/**
* Returns whether this extension is temporary
*
* @link https://php.net/manual/en/reflectionextension.istemporary.php
* @return bool Returns {@see true} for extensions loaded by {@see dl()}, {@see false} otherwise.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function isTemporary(): bool {}
/**
* Clones
*
* @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 {}
}

View File

@ -77,6 +77,18 @@ abstract class ReflectionFunctionAbstract implements Reflector
#[TentativeType]
public function getClosureThis(): ?object {}
/**
* Returns the scope associated to the closure
*
* @link https://php.net/manual/en/reflectionfunctionabstract.getclosurescopeclass.php
* @return ReflectionClass|null Returns the class on success or {@see null}
* on failure.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getClosureScopeClass(): ?ReflectionClass {}
/**
* Gets doc comment
*
@ -221,4 +233,13 @@ abstract class ReflectionFunctionAbstract implements Reflector
public function returnsReference(): bool {}
public function __toString() {}
/**
* Clones function
*
* @link https://php.net/manual/en/reflectionfunctionabstract.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
}

View File

@ -179,6 +179,18 @@ class ReflectionMethod extends ReflectionFunctionAbstract
#[TentativeType]
public function isDestructor(): bool {}
/**
* Returns a dynamically created closure for the method
*
* @link https://php.net/manual/en/reflectionmethod.getclosure.php
* @param object $object Forbidden for static methods, required for other methods or nothing.
* @return Closure|null Returns {@see Closure} or {@see null} in case of an error.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getClosure($object): Closure {}
/**
* Gets the method modifiers
*

View File

@ -74,6 +74,17 @@ class ReflectionParameter implements Reflector
#[TentativeType]
public function isPassedByReference(): bool {}
/**
* Returns whether this parameter can be passed by value
*
* @link https://php.net/manual/en/reflectionparameter.canbepassedbyvalue.php
* @return bool|null {@see true} if the parameter can be passed by value, {@see false} otherwise.
* Returns {@see null} in case of an error.
* @since 5.4
*/
#[TentativeType]
public function canBePassedByValue(): bool {}
/**
* Gets declaring function
*
@ -120,6 +131,20 @@ class ReflectionParameter implements Reflector
#[TentativeType]
public function isArray(): bool {}
/**
* Returns whether parameter MUST be callable
*
* @link https://php.net/manual/en/reflectionparameter.iscallable.php
* @return bool|null Returns {@see true} if the parameter is callable, {@see false}
* if it is not or {@see null} on failure.
* @since 5.4
* @see ReflectionParameter::getType()
*/
#[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
#[Pure]
#[TentativeType]
public function isCallable(): bool {}
/**
* Checks if null is allowed
*
@ -174,4 +199,35 @@ class ReflectionParameter implements Reflector
#[Pure]
#[TentativeType]
public function getDefaultValue(): mixed {}
/**
* Returns whether the default value of this parameter is constant
*
* @link https://php.net/manual/en/reflectionparameter.isdefaultvalueconstant.php
* @return bool Returns {@see true} if the default value is constant, and {@see false} otherwise.
* @since 5.4.6
*/
#[Pure]
#[TentativeType]
public function isDefaultValueConstant(): bool {}
/**
* Returns the default value's constant name if default value is constant or null
*
* @link https://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php
* @return string|null Returns string on success or {@see null} on failure.
* @throws ReflectionException if the parameter is not optional
* @since 5.4.6
*/
#[Pure]
#[TentativeType]
public function getDefaultValueConstantName(): ?string {}
/**
* Clone
*
* @link https://php.net/manual/en/reflectionparameter.clone.php
* @return void
*/
final private function __clone(): void {}
}

View File

@ -214,4 +214,13 @@ class ReflectionProperty implements Reflector
*/
#[TentativeType]
public function setAccessible($accessible): void {}
/**
* Clone
*
* @link https://php.net/manual/en/reflectionproperty.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
}

View File

@ -0,0 +1,115 @@
<?php
use JetBrains\PhpStorm\Immutable;
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;
/**
* @link https://secure.php.net/manual/en/class.reflectionzendextension.php
* @since 5.4
*/
class ReflectionZendExtension implements Reflector
{
/**
* @var string Name of the extension, same as calling the {@see ReflectionZendExtension::getName()} method
*/
#[Immutable]
public $name;
/**
* Constructs a ReflectionZendExtension object
*
* @link https://php.net/manual/en/reflectionzendextension.construct.php
* @param string $name
* @throws ReflectionException if the extension does not exist.
* @since 5.4
*/
public function __construct($name) {}
/**
* Exports a reflected zend extension.
*
* @link https://php.net/manual/en/reflectionzendextension.export.php
* @param string $name The reflection to export.
* @param bool $return Setting to {@see true} will return the
* export, as opposed to emitting it. Setting to {@see false} (the default)
* will do the opposite.
* @return string|null If the $return parameter is set to {@see true}, then
* the export is returned as a string, otherwise {@see null} is returned.
*/
public static function export($name, $return = false) {}
/**
* To string handler
*
* @link https://php.net/manual/en/reflectionzendextension.tostring.php
* @return string
* @since 5.4
*/
#[TentativeType]
public function __toString(): string {}
/**
* Gets name
*
* @link https://php.net/manual/en/reflectionzendextension.getname.php
* @return string
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getName(): string {}
/**
* Gets version
*
* @link https://php.net/manual/en/reflectionzendextension.getversion.php
* @return string
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getVersion(): string {}
/**
* Gets author
*
* @link https://php.net/manual/en/reflectionzendextension.getauthor.php
* @return string
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getAuthor(): string {}
/**
* Gets URL
*
* @link https://php.net/manual/en/reflectionzendextension.geturl.php
* @return string
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getURL(): string {}
/**
* Gets copyright
*
* @link https://php.net/manual/en/reflectionzendextension.getcopyright.php
* @return string
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getCopyright(): string {}
/**
* Clone handler
*
* @link https://php.net/manual/en/reflectionzendextension.clone.php
* @return void
* @since 5.4
*/
final private function __clone(): void {}
}

View File

@ -197,6 +197,68 @@ class EmptyIterator implements Iterator
public function rewind(): void {}
}
/**
* Filtered iterator using the callback to determine which items are accepted or rejected.
* @link https://secure.php.net/manual/en/class.callbackfilteriterator.php
* @since 5.4
*/
class CallbackFilterIterator extends FilterIterator
{
/**
* Creates a filtered iterator using the callback to determine which items are accepted or rejected.
* @param Iterator $iterator The iterator to be filtered.
* @param callable $callback The callback, which should return TRUE to accept the current item or FALSE otherwise.
* May be any valid callable value.
* The callback should accept up to three arguments: the current item, the current key and the iterator, respectively.
* <code> function my_callback($current, $key, $iterator) </code>
* @link https://secure.php.net/manual/en/callbackfilteriterator.construct.php
*/
public function __construct(Iterator $iterator, callable $callback) {}
/**
* This method calls the callback with the current value, current key and the inner iterator.
* The callback is expected to return TRUE if the current item is to be accepted, or FALSE otherwise.
* @link https://secure.php.net/manual/en/callbackfilteriterator.accept.php
* @return bool true if the current element is acceptable, otherwise false.
*/
#[TentativeType]
public function accept(): bool {}
}
/**
* (PHP 5 >= 5.4.0)<br>
* RecursiveCallbackFilterIterator from a RecursiveIterator
* @link https://secure.php.net/manual/en/class.recursivecallbackfilteriterator.php
* @since 5.4
*/
class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements RecursiveIterator
{
/**
* Create a RecursiveCallbackFilterIterator from a RecursiveIterator
* @param RecursiveIterator $iterator The recursive iterator to be filtered.
* @param callable $callback The callback, which should return TRUE to accept the current item or FALSE otherwise. See Examples.
* May be any valid callable value.
* @link https://www.php.net/manual/en/recursivecallbackfilteriterator.construct.php
*/
public function __construct(RecursiveIterator $iterator, $callback) {}
/**
* Check whether the inner iterator's current element has children
* @link https://php.net/manual/en/recursiveiterator.haschildren.php
* @return bool Returns TRUE if the current element has children, FALSE otherwise.
*/
#[TentativeType]
public function hasChildren(): bool {}
/**
* Returns an iterator for the current entry.
* @link https://secure.php.net/manual/en/recursivecallbackfilteriterator.haschildren.php
* @return RecursiveCallbackFilterIterator containing the children.
*/
#[TentativeType]
public function getChildren(): RecursiveCallbackFilterIterator {}
}
/**
* Can be used to iterate through recursive iterators.
* @link https://php.net/manual/en/class.recursiveiteratoriterator.php
@ -1203,6 +1265,15 @@ class RegexIterator extends FilterIterator
#[TentativeType]
public function setFlags($flags): void {}
/**
* Returns current regular expression
* @link https://secure.php.net/manual/en/regexiterator.getregex.php
* @return string
* @since 5.4
*/
#[TentativeType]
public function getRegex(): string {}
/**
* Returns the regular expression flags.
* @link https://php.net/manual/en/regexiterator.getpregflags.php

View File

@ -720,6 +720,23 @@ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIt
#[TentativeType]
public function fgetcsv($separator = ',', $enclosure = '"', $escape = "\\"): array|false|null {}
/**
* Write a field array as a CSV line
* @link https://php.net/manual/en/splfileobject.fputcsv.php
* @param array $fields An array of values
* @param string $separator [optional] <p>
* The field delimiter (one character only). Defaults as a comma or the value set using <b>SplFileObject::setCsvControl</b>.
* </p>
* @param string $enclosure [optional] <p>
* The field enclosure character (one character only). Defaults as a double quotation mark or the value set using <b>SplFileObject::setCsvControl</b>.
* </p>
* @param string $escape The optional escape parameter sets the escape character (one character only).
* @return int|false Returns the length of the written string or FALSE on failure.
* @since 5.4
*/
#[TentativeType]
public function fputcsv(array $fields, $separator = ',', $enclosure = '"', $escape = "\\"): int|false {}
/**
* Set the delimiter and enclosure character for CSV
* @link https://php.net/manual/en/splfileobject.setcsvcontrol.php
@ -1213,6 +1230,25 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializa
*/
#[TentativeType]
public function valid(): bool {}
/**
* Unserializes the storage
* @link https://php.net/manual/en/spldoublylinkedlist.serialize.php
* @param string $data The serialized string.
* @return void
* @since 5.4
*/
#[TentativeType]
public function unserialize($data): void {}
/**
* Serializes the storage
* @link https://php.net/manual/en/spldoublylinkedlist.unserialize.php
* @return string The serialized string.
* @since 5.4
*/
#[TentativeType]
public function serialize(): string {}
}
/**
@ -1691,7 +1727,7 @@ class SplPriorityQueue implements Iterator, Countable
* @template-implements ArrayAccess<int, TValue>
* @template-implements IteratorAggregate<int, TValue>
*/
class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggregate
class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggregate, JsonSerializable
{
/**
* Constructs a new fixed array
@ -2061,6 +2097,18 @@ class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess
*/
#[TentativeType]
public function offsetGet($object): mixed {}
/**
* Calculate a unique identifier for the contained objects
* @link https://php.net/manual/en/splobjectstorage.gethash.php
* @param TObject $object <p>
* object whose identifier is to be calculated.
* </p>
* @return string A string with the calculated identifier.
* @since 5.4
*/
#[TentativeType]
public function getHash($object): string {}
}
/**

View File

@ -174,3 +174,15 @@ function iterator_count(Traversable $iterator): int {}
* @return int the iteration count.
*/
function iterator_apply(Traversable $iterator, callable $callback, ?array $args): int {}
/**
* Return the traits used by the given class
* @param object|string $object_or_class An object (class instance) or a string (class name).
* @param bool $autoload Whether to allow this function to load the class automatically through the __autoload() magic method.
* @return string[]|false An array on success, or false on error.
* @link https://php.net/manual/en/function.class-uses.php
* @see class_parents()
* @see get_declared_traits()
* @since 5.4
*/
function class_uses($object_or_class, bool $autoload = true): array|false {}

View File

@ -21,6 +21,34 @@ define('CURLOPT_SSH_AUTH_TYPES', 151);
*/
define('CURLINFO_REDIRECT_URL', 1048607);
/**
* IP address of the most recent connection
* @link https://www.php.net/manual/en/function.curl-getinfo.php
* @since 5.4.7
*/
define('CURLINFO_PRIMARY_IP', 1048608);
/**
* Destination port of the most recent connection
* @link https://www.php.net/manual/en/function.curl-getinfo.php
* @since 5.4.7
*/
define('CURLINFO_PRIMARY_PORT', 2097192);
/**
* Local (source) IP address of the most recent connection
* @link https://www.php.net/manual/en/function.curl-getinfo.php
* @since 5.4.7
*/
define('CURLINFO_LOCAL_IP', 1048617);
/**
* Local (source) port of the most recent connection
* @link https://www.php.net/manual/en/function.curl-getinfo.php
* @since 5.4.7
*/
define('CURLINFO_LOCAL_PORT', 2097194);
/**
* Allows an application to select what kind of IP addresses to use when resolving host names.
* This is only interesting when using host names that resolve addresses using more than one version of IP,
@ -251,6 +279,24 @@ define('CURLOPT_PROTOCOLS', 181);
*/
define('CURLOPT_REDIR_PROTOCOLS', 182);
/**
* If a download exceeds this speed (counted in bytes per second) on cumulative average during the transfer,
* the transfer will pause to keep the average rate less than or equal to the parameter value.
* Defaults to unlimited speed.
* @link https://www.php.net/manual/en/function.curl-setopt.php
* @since 5.4
*/
define('CURLOPT_MAX_RECV_SPEED_LARGE', 30146);
/**
* If an upload exceeds this speed (counted in bytes per second) on cumulative average during the transfer,
* the transfer will pause to keep the average rate less than or equal to the parameter value.
* Defaults to unlimited speed.
* @link https://www.php.net/manual/en/function.curl-setopt.php
* @since 5.4
*/
define('CURLOPT_MAX_SEND_SPEED_LARGE', 30145);
/**
* A callback accepting three parameters.
* The first is the cURL resource, the second is a string containing a password prompt, and the third is the maximum password length.

View File

@ -907,7 +907,7 @@ function getdate(?int $timestamp): array {}
function date_create(string $datetime = 'now', ?DateTimeZone $timezone): DateTime|false {}
/**
* Returns new DateTimeImmutable object formatted according to the specified format
* Returns new DateTime object formatted according to the specified format
* @link https://php.net/manual/en/function.date-create-immutable-from-format.php
* @param string $format
* @param string $datetime

View File

@ -1389,7 +1389,7 @@ class DOMAttr extends DOMNode
class DOMElement extends DOMNode
{
/**
* @var \DOMNode|null
* @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
*/

View File

@ -1178,6 +1178,17 @@ function imagecreatefromjpeg(string $filename) {}
*/
function imagecreatefromwbmp(string $filename) {}
/**
* Create a new image from file or URL
* @link https://php.net/manual/en/function.imagecreatefromwebp.php
* @param string $filename <p>
* Path to the WebP image.
* </p>
* @return resource|false an image resource identifier on success, false on errors.
* @since 5.4
*/
function imagecreatefromwebp(string $filename) {}
/**
* Create a new image from file or URL
* @link https://php.net/manual/en/function.imagecreatefromxbm.php
@ -1266,6 +1277,22 @@ function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, in
*/
function imagepng($image, $file = null, int $quality = -1, int $filters = -1): bool {}
/**
* Output a WebP image to browser or file
* @link https://php.net/manual/en/function.imagewebp.php
* @param resource $image
* @param string $to [optional] <p>
* The path to save the file to. If not set or null, the raw image stream
* will be outputted directly.
* </p>
* @param int $quality [optional] <p>
* quality ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file).
* </p>
* @return bool true on success or false on failure.
* @since 5.4
*/
function imagewebp($image, $to = null, $quality = 80): bool {}
/**
* Output image to browser or file
* @link https://php.net/manual/en/function.imagegif.php

View File

@ -381,6 +381,78 @@ define('INTL_IDNA_VARIANT_UTS46', 1);
*/
define('IDNA_ERROR_EMPTY_LABEL', 1);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_LABEL_TOO_LONG', 2);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_LEADING_HYPHEN', 8);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_TRAILING_HYPHEN', 16);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_HYPHEN_3_4', 32);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_LEADING_COMBINING_MARK', 64);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_DISALLOWED', 128);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_PUNYCODE', 256);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_LABEL_HAS_DOT', 512);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_INVALID_ACE_LABEL', 1024);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_BIDI', 2048);
/**
* @link https://secure.php.net/manual/en/migration54.global-constants.php
* @since 5.4
*/
define('IDNA_ERROR_CONTEXTJ', 4096);
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/>
* Create a collator
@ -1857,6 +1929,117 @@ function resourcebundle_get_error_code(ResourceBundle $bundle): int {}
#[Pure(true)]
function resourcebundle_get_error_message(ResourceBundle $bundle): string {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Create a transliterator
* @link https://php.net/manual/en/transliterator.create.php
* @param string $id <p>
* The id.
* </p>
* @param int $direction <p>
* The direction, defaults to
* Transliterator::FORWARD.
* May also be set to
* Transliterator::REVERSE.
* </p>
* @return Transliterator|null a <b>Transliterator</b> object on success,
* or <b>NULL</b> on failure.
* @since 5.4
*/
#[Pure]
function transliterator_create(string $id, int $direction = 0): ?Transliterator {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Create transliterator from rules
* @link https://php.net/manual/en/transliterator.createfromrules.php
* @param string $rules <p>
* The rules.
* </p>
* @param int $direction <p>
* The direction, defaults to
* Transliterator::FORWARD.
* May also be set to
* Transliterator::REVERSE.
* </p>
* @return Transliterator|null a <b>Transliterator</b> object on success,
* or <b>NULL</b> on failure.
* @since 5.4
*/
#[Pure]
function transliterator_create_from_rules(string $rules, int $direction = 0): ?Transliterator {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Get transliterator IDs
* @link https://php.net/manual/en/transliterator.listids.php
* @return string[]|false An array of registered transliterator IDs on success,
* or <b>FALSE</b> on failure.
* @since 5.4
*/
#[Pure]
function transliterator_list_ids(): array|false {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Create an inverse transliterator
* @link https://php.net/manual/en/transliterator.createinverse.php
* @param Transliterator $transliterator
* @return Transliterator|null a <b>Transliterator</b> object on success,
* or <b>NULL</b> on failure
* @since 5.4
*/
#[Pure]
function transliterator_create_inverse(Transliterator $transliterator): ?Transliterator {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Transliterate a string
* @link https://php.net/manual/en/transliterator.transliterate.php
* @param Transliterator|string $transliterator
* @param string $string <p>
* The string to be transformed.
* </p>
* @param int $start <p>
* The start index (in UTF-16 code units) from which the string will start
* to be transformed, inclusive. Indexing starts at 0. The text before will
* be left as is.
* </p>
* @param int $end <p>
* The end index (in UTF-16 code units) until which the string will be
* transformed, exclusive. Indexing starts at 0. The text after will be
* left as is.
* </p>
* @return string|false The transfomed string on success, or <b>FALSE</b> on failure.
* @since 5.4
*/
#[Pure]
function transliterator_transliterate(Transliterator|string $transliterator, string $string, int $start = 0, int $end = -1): string|false {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Get last error code
* @link https://php.net/manual/en/transliterator.geterrorcode.php
* @param Transliterator $transliterator
* @return int|false The error code on success,
* or <b>FALSE</b> if none exists, or on failure.
* @since 5.4
*/
#[Pure(true)]
function transliterator_get_error_code(Transliterator $transliterator): int|false {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Get last error message
* @link https://php.net/manual/en/transliterator.geterrormessage.php
* @param Transliterator $transliterator
* @return string|false The error code on success,
* or <b>FALSE</b> if none exists, or on failure.
* @since 5.4
*/
#[Pure(true)]
function transliterator_get_error_message(Transliterator $transliterator): string|false {}
/**
* (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)<br/>
* Get the last error code
@ -3999,6 +4182,139 @@ class ResourceBundle implements IteratorAggregate, Countable
public function getErrorMessage(): string {}
}
/**
* @since 5.4
*/
class Transliterator
{
public const FORWARD = 0;
public const REVERSE = 1;
/**
* Starting 8.2 $id is readonly to unlock subclassing it
*/
public $id;
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Private constructor to deny instantiation
* @link https://php.net/manual/en/transliterator.construct.php
* @since 5.4
*/
final private function __construct() {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Create a transliterator
* @link https://php.net/manual/en/transliterator.create.php
* @param string $id <p>
* The id.
* </p>
* @param int $direction [optional] <p>
* The direction, defaults to
* Transliterator::FORWARD.
* May also be set to
* Transliterator::REVERSE.
* </p>
* @return Transliterator|null a <b>Transliterator</b> object on success,
* or <b>NULL</b> on failure.
* @since 5.4
*/
#[TentativeType]
public static function create($id, #[ExpectedValues([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null): ?Transliterator {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Create transliterator from rules
* @link https://php.net/manual/en/transliterator.createfromrules.php
* @param string $rules <p>
* The rules.
* </p>
* @param int $direction [optional] <p>
* The direction, defaults to
* {@see Transliterator::FORWARD}.
* May also be set to
* {@see Transliterator::REVERSE}.
* </p>
* @return Transliterator|null a <b>Transliterator</b> object on success,
* or <b>NULL</b> on failure.
* @since 5.4
*/
#[TentativeType]
public static function createFromRules($rules, #[ExpectedValues([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null): ?Transliterator {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Get transliterator IDs
* @link https://php.net/manual/en/transliterator.listids.php
* @return array|false An array of registered transliterator IDs on success,
* or <b>FALSE</b> on failure.
* @since 5.4
*/
#[TentativeType]
public static function listIDs(): array|false {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Create an inverse transliterator
* @link https://php.net/manual/en/transliterator.createinverse.php
* @return Transliterator|null a <b>Transliterator</b> object on success,
* or <b>NULL</b> on failure
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function createInverse(): ?Transliterator {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Transliterate a string
* @link https://php.net/manual/en/transliterator.transliterate.php
* @param string $string <p>
* The string to be transformed.
* </p>
* @param int $start [optional] <p>
* The start index (in UTF-16 code units) from which the string will start
* to be transformed, inclusive. Indexing starts at 0. The text before will
* be left as is.
* </p>
* @param int $end [optional] <p>
* The end index (in UTF-16 code units) until which the string will be
* transformed, exclusive. Indexing starts at 0. The text after will be
* left as is.
* </p>
* @return string|false The transfomed string on success, or <b>FALSE</b> on failure.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function transliterate($string, $start = null, $end = -1): string|false {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Get last error code
* @link https://php.net/manual/en/transliterator.geterrorcode.php
* @return int|false The error code on success,
* or <b>FALSE</b> if none exists, or on failure.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getErrorCode(): int|false {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Get last error message
* @link https://php.net/manual/en/transliterator.geterrormessage.php
* @return string|false The error code on success,
* or <b>FALSE</b> if none exists, or on failure.
* @since 5.4
*/
#[Pure]
#[TentativeType]
public function getErrorMessage(): string|false {}
}
/**
* @link https://php.net/manual/en/class.spoofchecker.php
*/
@ -4018,6 +4334,69 @@ class Spoofchecker
public const UNRESTRICTIVE = 1610612736;
public const SINGLE_SCRIPT_RESTRICTIVE = 536870912;
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Constructor
* @link https://php.net/manual/en/spoofchecker.construct.php
* @since 5.4
*/
#[Pure]
public function __construct() {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Checks if a given text contains any suspicious characters
* @link https://php.net/manual/en/spoofchecker.issuspicious.php
* @param string $string <p>
* </p>
* @param string &$errorCode [optional] <p>
* </p>
* @return bool
* @since 5.4
*/
#[TentativeType]
public function isSuspicious($string, &$errorCode = null): bool {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Checks if a given text contains any confusable characters
* @link https://php.net/manual/en/spoofchecker.areconfusable.php
* @param string $string1 <p>
* </p>
* @param string $string2 <p>
* </p>
* @param string &$errorCode [optional] <p>
* </p>
* @return bool
* @since 5.4
*/
#[TentativeType]
public function areConfusable($string1, $string2, &$errorCode = null): bool {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Locales to use when running checks
* @link https://php.net/manual/en/spoofchecker.setallowedlocales.php
* @param string $locales <p>
* </p>
* @return void
* @since 5.4
*/
#[TentativeType]
public function setAllowedLocales($locales): void {}
/**
* (PHP >= 5.4.0, PECL intl >= 2.0.0)<br/>
* Set the checks to run
* @link https://php.net/manual/en/spoofchecker.setchecks.php
* @param int $checks <p>
* </p>
* @return void
* @since 5.4
*/
#[TentativeType]
public function setChecks($checks): void {}
#[TentativeType]
public function setRestrictionLevel(int $level): void {}
}

View File

@ -5,6 +5,7 @@
* @link https://php.net/manual/en/json.constants.php
*/
use JetBrains\PhpStorm\Internal\TentativeType;
use JetBrains\PhpStorm\Pure;
define('JSON_HEX_TAG', 1);
@ -42,6 +43,27 @@ define('JSON_FORCE_OBJECT', 16);
*/
define('JSON_NUMERIC_CHECK', 32);
/**
* Don't escape /.
* @since 5.4
* @link https://php.net/manual/en/json.constants.php
*/
define('JSON_UNESCAPED_SLASHES', 64);
/**
* Use whitespace in returned data to format it.
* @since 5.4
* @link https://php.net/manual/en/json.constants.php
*/
define('JSON_PRETTY_PRINT', 128);
/**
* Encode multibyte Unicode characters literally (default is to escape as \uXXXX).
* @since 5.4
* @link https://php.net/manual/en/json.constants.php
*/
define('JSON_UNESCAPED_UNICODE', 256);
define('JSON_PARTIAL_OUTPUT_ON_ERROR', 512);
/**
@ -125,8 +147,22 @@ define('JSON_ERROR_DEPTH', 1);
*/
define('JSON_ERROR_SYNTAX', 4);
/**
* Decodes JSON objects as PHP array.
* @since 5.4
* @link https://php.net/manual/en/json.constants.php
*/
define('JSON_OBJECT_AS_ARRAY', 1);
define('JSON_PARSER_NOTSTRICT', 4);
/**
* Decodes large integers as their original string value.
* @since 5.4
* @link https://php.net/manual/en/json.constants.php
*/
define('JSON_BIGINT_AS_STRING', 2);
/**
* (PHP 5 >= 5.2.0, PECL json >= 1.2.0)<br/>
* Returns the JSON representation of a value
@ -295,6 +331,26 @@ function json_decode(string $json, ?bool $associative = null, int $depth = 512,
#[Pure(true)]
function json_last_error(): int {}
/**
* Objects implementing JsonSerializable
* can customize their JSON representation when encoded with
* <b>json_encode</b>.
* @link https://php.net/manual/en/class.jsonserializable.php
* @since 5.4
*/
interface JsonSerializable
{
/**
* Specify data which should be serialized to JSON
* @link https://php.net/manual/en/jsonserializable.jsonserialize.php
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* @since 5.4
*/
#[TentativeType]
public function jsonSerialize(): mixed;
}
class JsonIncrementalParser
{
public const JSON_PARSER_SUCCESS = 0;

View File

@ -1082,3 +1082,123 @@ function ldap_start_tls($ldap): bool {}
* @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 {}
/**
* (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>
* An LDAP link identifier, returned by
* {@see ldap_connect()}.
* </p>
* @param string $dn <p>The distinguished name of an LDAP entity.</p>
* @param array $modifications_info <p>An array that specifies the modifications to make. Each entry in this
* array is an associative array with two or three keys:
* <em>attrib</em> maps to the name of the attribute to modify,
* <em>modtype</em> maps to the type of modification to perform,
* and (depending on the type of modification) <em>values</em>
* maps to an array of attribute values relevant to the modification.
* </p>
* <p>
* Possible values for <em>modtype</em> include:
* </p>
* <dl>
*
* <dt>
* <b>LDAP_MODIFY_BATCH_ADD</b></dt>
* <dd>
* <p>
* Each value specified through <em>values</em> is added (as
* an additional value) to the attribute named by
* <em>attrib</em>.
* </p>
* </dd>
*
* <dt>
* <b>LDAP_MODIFY_BATCH_REMOVE</b></dt>
* <dd>
* <p>
* Each value specified through <em>values</em> is removed
* from the attribute named by <em>attrib</em>. Any value of
* the attribute not contained in the <em>values</em> array
* will remain untouched.
* </p>
* </dd>
*
* <dt>
* <b>LDAP_MODIFY_BATCH_REMOVE_ALL</b></dt>
* <dd>
* <p>
* All values are removed from the attribute named by
* <em>attrib</em>. A <em>values</em> entry must
* not be provided.
* </p>
* </dd>
*
* <dt>
* <b>LDAP_MODIFY_BATCH_REPLACE</b></dt>
* <dd>
* <p>
* All current values of the attribute named by
* <em>attrib</em> are replaced with the values specified
* through <em>values</em>.
* </p>
* </dd>
*
* </dl>
* <p>
* Note that any value for <em>attrib</em> must be a string, any
* value for <em>values</em> must be an array of strings, and
* any value for <em>modtype</em> must be one of the
* <b>LDAP_MODIFY_BATCH_*</b> constants listed above.
* </p>
* @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.
* @since 5.4
*/
function ldap_modify_batch($ldap, string $dn, array $modifications_info): bool {}

View File

@ -83,6 +83,13 @@ define('LIBXML_NOCDATA', 16384);
*/
define('LIBXML_NONET', 2048);
/**
* Sets XML_PARSE_PEDANTIC flag, which enables pedentic error reporting.
* @link https://php.net/manual/en/libxml.constants.php
* @since 5.4
*/
define('LIBXML_PEDANTIC', 128);
/**
* Activate small nodes allocation optimization. This may speed up your
* application without needing to change the code.
@ -248,6 +255,20 @@ function libxml_get_errors(): array {}
#[Deprecated(since: "8.0")]
function libxml_disable_entity_loader(bool $disable = true): bool {}
/**
* Changes the default external entity loader
* @link https://php.net/manual/en/function.libxml-set-external-entity-loader.php
* @param callable|null $resolver_function <p>
* A callable that takes three arguments. Two strings, a public id
* and system id, and a context (an array with four keys) as the third argument.
* This callback should return a resource, a string from which a resource can be
* opened, or <b>NULL</b>.
* </p>
* @return bool
* @since 5.4
*/
function libxml_set_external_entity_loader(?callable $resolver_function): bool {}
/**
* Contains various information about errors thrown by libxml. The error codes
* are described within the official

View File

@ -1004,6 +1004,51 @@ function mb_eregi(string $pattern, string $string, &$matches): false|int {}
#[Pure]
function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {}
/**
* Perform a regular expresssion seach and replace with multibyte support using a callback
* @link https://secure.php.net/manual/en/function.mb-ereg-replace-callback.php
* @param string $pattern <p>
* The regular expression pattern.
* </p>
* <p>
* Multibyte characters may be used in <b>pattern</b>.
* </p>
* @param callable $callback <p>
* A callback that will be called and passed an array of matched elements
* in the <b>subject</b> string. The callback should
* return the replacement string.
* </p>
* <p>
* You'll often need the <b>callback</b> function
* for a <b>mb_ereg_replace_callback()</b> in just one place.
* In this case you can use an anonymous function to
* declare the callback within the call to
* <b>mb_ereg_replace_callback()</b>. By doing it this way
* you have all information for the call in one place and do not
* clutter the function namespace with a callback function's name
* not used anywhere else.
* </p>
* @param string $string <p>
* The string being checked.
* </p>
* @param string $options <p>
* Matching condition can be set by <em><b>option</b></em>
* parameter. If <em>i</em> is specified for this
* parameter, the case will be ignored. If <em>x</em> is
* specified, white space will be ignored. If <em>m</em>
* is specified, match will be executed in multiline mode and line
* break will be included in '.'. If <em>p</em> is
* specified, match will be executed in POSIX mode, line break
* will be considered as normal character. Note that <em>e</em>
* cannot be used for <b>mb_ereg_replace_callback()</b>.
* </p>
* @return string|false|null <p>
* The resultant string on success, or <b>FALSE</b> on error.
* </p>
* @since 5.4.1
*/
function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {}
/**
* Replace regular expression with multibyte support ignoring case
* @link https://php.net/manual/en/function.mb-eregi-replace.php

View File

@ -807,6 +807,25 @@ function mysqli_debug(string $options): bool {}
*/
function mysqli_errno(mysqli $mysql): int {}
/**
* Returns a list of errors from the last command executed
* @link https://php.net/manual/en/mysqli.error-list.php
* @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return array A list of errors, each as an associative array containing the errno, error, and sqlstate.
* @since 5.4
*/
#[ArrayShape(["errno" => "int", "sqlstate" => "string", "error" => "string"])]
function mysqli_error_list(mysqli $mysql): array {}
/**
* Returns a list of errors from the last statement executed
* @link https://secure.php.net/manual/en/mysqli-stmt.error-list.php
* @param mysqli_stmt $statement A statement identifier returned by mysqli_stmt_init().
* @return array A list of errors, each as an associative array containing the errno, error, and sqlstate.
* @since 5.4
*/
function mysqli_stmt_error_list(mysqli_stmt $statement): array {}
/**
* Returns a string description of the last error
* @link https://secure.php.net/manual/en/mysqli.error.php

View File

@ -1702,6 +1702,40 @@ function pg_escape_string($connection = null, string $string = null): string {}
*/
function pg_escape_bytea($connection = null, string $string = null): string {}
/**
* Escape a identifier for insertion into a text field
* @link https://php.net/manual/en/function.pg-escape-identifier.php
* @param resource $connection <p>
* PostgreSQL database connection resource. When
* <i>connection</i> is not present, the default connection
* is used. The default connection is the last connection made by
* <b>pg_connect</b> or <b>pg_pconnect</b>.
* </p>
* @param string $string <p>
* A string containing text to be escaped.
* </p>
* @return string|false A string containing the escaped data.
* @since 5.4.4
*/
function pg_escape_identifier($connection = null, string $string = null): string|false {}
/**
* Escape a literal for insertion into a text field
* @link https://php.net/manual/en/function.pg-escape-literal.php
* @param resource $connection <p>
* PostgreSQL database connection resource. When
* <i>connection</i> is not present, the default connection
* is used. The default connection is the last connection made by
* <b>pg_connect</b> or <b>pg_pconnect</b>.
* </p>
* @param string $string <p>
* A string containing text to be escaped.
* </p>
* @return string|false A string containing the escaped data.
* @since 5.4.4
*/
function pg_escape_literal($connection = null, string $string = null): string|false {}
/**
* Unescape binary for bytea type
* @link https://php.net/manual/en/function.pg-unescape-bytea.php

234
session/SessionHandler.php Normal file
View File

@ -0,0 +1,234 @@
<?php
use JetBrains\PhpStorm\Internal\TentativeType;
/**
* <b>SessionHandlerInterface</b> is an interface which defines
* a prototype for creating a custom session handler.
* In order to pass a custom session handler to
* session_set_save_handler() using its OOP invocation,
* the class must implement this interface.
* @link https://php.net/manual/en/class.sessionhandlerinterface.php
* @since 5.4
*/
interface SessionHandlerInterface
{
/**
* Close the session
* @link https://php.net/manual/en/sessionhandlerinterface.close.php
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function close(): bool;
/**
* Destroy a session
* @link https://php.net/manual/en/sessionhandlerinterface.destroy.php
* @param string $id The session ID being destroyed.
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function destroy($id): bool;
/**
* Cleanup old sessions
* @link https://php.net/manual/en/sessionhandlerinterface.gc.php
* @param int $max_lifetime <p>
* Sessions that have not updated for
* the last maxlifetime seconds will be removed.
* </p>
* @return int|false <p>
* Returns the number of deleted sessions on success, or false on failure. Prior to PHP version 7.1, the function returned true on success.
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function gc($max_lifetime): bool;
/**
* Initialize session
* @link https://php.net/manual/en/sessionhandlerinterface.open.php
* @param string $path The path where to store/retrieve the session.
* @param string $name The session name.
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function open($path, $name): bool;
/**
* Read session data
* @link https://php.net/manual/en/sessionhandlerinterface.read.php
* @param string $id The session id to read data for.
* @return string|false <p>
* Returns an encoded string of the read data.
* If nothing was read, it must return false.
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function read($id): string|false;
/**
* Write session data
* @link https://php.net/manual/en/sessionhandlerinterface.write.php
* @param string $id The session id.
* @param string $data <p>
* The encoded session data. This data is the
* result of the PHP internally encoding
* the $_SESSION superglobal to a serialized
* string and passing it as this parameter.
* Please note sessions use an alternative serialization method.
* </p>
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function write($id, $data): bool;
}
/**
* <b>SessionHandler</b> a special class that can
* be used to expose the current internal PHP session
* save handler by inheritance. There are six methods
* which wrap the six internal session save handler
* callbacks (open, close, read, write, destroy and gc).
* By default, this class will wrap whatever internal
* save handler is set as as defined by the
* session.save_handler configuration directive which is usually
* files by default. Other internal session save handlers are provided by
* PHP extensions such as SQLite (as sqlite),
* Memcache (as memcache), and Memcached (as memcached).
* @link https://php.net/manual/en/class.reflectionzendextension.php
* @since 5.4
*/
class SessionHandler implements SessionHandlerInterface
{
/**
* Close the session
* @link https://php.net/manual/en/sessionhandler.close.php
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function close(): bool {}
/**
* Destroy a session
* @link https://php.net/manual/en/sessionhandler.destroy.php
* @param string $id The session ID being destroyed.
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function destroy($id): bool {}
/**
* Cleanup old sessions
* @link https://php.net/manual/en/sessionhandler.gc.php
* @param int $max_lifetime <p>
* Sessions that have not updated for
* the last maxlifetime seconds will be removed.
* </p>
* @return int|bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function gc($max_lifetime): int|false {}
/**
* Initialize session
* @link https://php.net/manual/en/sessionhandler.open.php
* @param string $path The path where to store/retrieve the session.
* @param string $name The session name.
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function open($path, $name): bool {}
/**
* Read session data
* @link https://php.net/manual/en/sessionhandler.read.php
* @param string $id The session id to read data for.
* @return string|false <p>
* Returns an encoded string of the read data.
* If nothing was read, it must return an empty string.
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function read($id): string|false {}
/**
* Write session data
* @link https://php.net/manual/en/sessionhandler.write.php
* @param string $id The session id.
* @param string $data <p>
* The encoded session data. This data is the
* result of the PHP internally encoding
* the $_SESSION superglobal to a serialized
* string and passing it as this parameter.
* Please note sessions use an alternative serialization method.
* </p>
* @return bool <p>
* The return value (usually TRUE on success, FALSE on failure).
* Note this value is returned internally to PHP for processing.
* </p>
* @since 5.4
*/
#[TentativeType]
public function write($id, $data): bool {}
/**
* Validate session id
* @param string $session_id The session id
* @return bool <p>
* Note this value is returned internally to PHP for processing.
* </p>
*/
public function validateId($session_id) {}
/**
* Update timestamp of a session
* @param string $session_id The session id
* @param string $session_data <p>
* The encoded session data. This data is the
* result of the PHP internally encoding
* the $_SESSION superglobal to a serialized
* string and passing it as this parameter.
* Please note sessions use an alternative serialization method.
* </p>
* @return bool
*/
public function updateTimestamp($session_id, $session_data) {}
}

View File

@ -226,6 +226,19 @@ function session_unset(): void {}
*/
function session_set_save_handler(callable $open, callable $close, callable $read, callable $write, callable $destroy, callable $gc, ?callable $create_sid = null, ?callable $validate_sid = null, ?callable $update_timestamp = null): bool {}
/**
* (PHP 5.4)<br/>
* Sets user-level session storage functions
* @link https://php.net/manual/en/function.session-set-save-handler.php
* @param SessionHandlerInterface $session_handler An instance of a class implementing SessionHandlerInterface,
* and optionally SessionIdInterface and/or SessionUpdateTimestampHandlerInterface, such as SessionHandler,
* to register as the session handler. Since PHP 5.4 only.
* @param bool $register_shutdown [optional] Register session_write_close() as a register_shutdown_function() function.
* @return bool true on success or false on failure.
* @since 5.4
*/
function session_set_save_handler(SessionHandlerInterface $sessionhandler, bool $register_shutdown = true): bool {}
/**
* Get and/or set the current cache limiter
* @link https://php.net/manual/en/function.session-cache-limiter.php
@ -362,3 +375,14 @@ function session_write_close(): void {}
* @return void|bool since 7.2.0 returns true on success or false on failure.
*/
function session_commit(): void {}
/**
* (PHP 5 >= 5.4.0)<br>
* Returns the current session status
* @link https://php.net/manual/en/function.session-status.php
* @return int <b>PHP_SESSION_DISABLED</b> if sessions are disabled.
* <b>PHP_SESSION_NONE</b> if sessions are enabled, but none exists.
* <b>PHP_SESSION_ACTIVE</b> if sessions are enabled, and one exists.
* @since 5.4
*/
function session_status(): int {}

View File

@ -824,6 +824,198 @@ class SNMP
* @link https://secure.php.net/manual/en/class.snmp.php#snmp.props.info
*/
public $info;
/**
* Creates SNMP instance representing session to remote SNMP agent
* @link https://php.net/manual/en/snmp.construct.php
* @param int $version <p>SNMP protocol version:
* <b>SNMP::VERSION_1</b>,
* <b>SNMP::VERSION_2C</b>,
* <b>SNMP::VERSION_3</b>.</p>
* @param string $hostname The SNMP agent. <i>hostname</i> may be suffixed with
* optional <acronym title="Simple Network Management Protocol">SNMP</acronym> agent port after colon. IPv6 addresses must be enclosed in square
* brackets if used with port. If FQDN is used for <i>hostname</i>
* it will be resolved by php-snmp library, not by Net-SNMP engine. Usage
* of IPv6 addresses when specifying FQDN may be forced by enclosing FQDN
* into square brackets. Here it is some examples:
* <table>
* <tbody>
* <tr><td>IPv4 with default port</td><td>127.0.0.1</td></tr>
* <tr><td>IPv6 with default port</td><td>::1 or [::1]</td></tr>
* <tr><td>IPv4 with specific port</td><td>127.0.0.1:1161</td></tr>
* <tr><td>IPv6 with specific port</td><td>[::1]:1161</td></tr>
* <tr><td>FQDN with default port</td><td>host.domain</td></tr>
* <tr><td>FQDN with specific port</td><td>host.domain:1161</td></tr>
* <tr><td>FQDN with default port, force usage of IPv6 address</td><td>[host.domain]</td></tr>
* <tr><td>FQDN with specific port, force usage of IPv6 address</td><td>[host.domain]:1161</td></tr>
* </tbody>
* </table>
* @param string $community <p>The purpuse of <i>community</i> is
* <acronym title="Simple Network Management Protocol">SNMP</acronym> version specific:</p>
* <table>
* <tbody>
* <tr><td>SNMP::VERSION_1</td><td><acronym title="Simple Network Management Protocol">SNMP</acronym> community</td></tr>
* <tr><td>SNMP::VERSION_2C</td><td><acronym title="Simple Network Management Protocol">SNMP</acronym> community</td></tr>
* <tr><td>SNMP::VERSION_3</td><td><acronym title="Simple Network Management Protocol">SNMP</acronym>v3 securityName</td></tr>
* </tbody>
* </table>
* @param int $timeout [optional] The number of microseconds until the first timeout.
* @param int $retries [optional] The number of retries in case timeout occurs.
* @since 5.4
*/
public function __construct($version, $hostname, $community, $timeout = 1000000, $retries = 5) {}
/**
* Close SNMP session
* @link https://php.net/manual/en/snmp.close.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4
*/
public function close() {}
/**
* Configures security-related SNMPv3 session parameters
* @link https://php.net/manual/en/snmp.setsecurity.php
* @param string $sec_level the security level (noAuthNoPriv|authNoPriv|authPriv)
* @param string $auth_protocol [optional] the authentication protocol (MD5 or SHA)
* @param string $auth_passphrase [optional] the authentication pass phrase
* @param string $priv_protocol [optional] the privacy protocol (DES or AES)
* @param string $priv_passphrase [optional] the privacy pass phrase
* @param string $contextName [optional] the context name
* @param string $contextEngineID [optional] the context EngineID
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* @since 5.4
*/
public function setSecurity($sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $contextName, $contextEngineID) {}
/**
* Fetch an SNMP object
* @link https://php.net/manual/en/snmp.get.php
* @param mixed $object_id The SNMP object (OID) or objects
* @param bool $preserve_keys [optional] When object_id is a array and preserve_keys set to <b>TRUE</b> keys in results will be taken exactly as in object_id, otherwise SNMP::oid_output_format property is used to determinate the form of keys.
* @return mixed SNMP objects requested as string or array
* depending on <i>object_id</i> type or <b>FALSE</b> on error.
* @since 5.4
*/
public function get($object_id, $preserve_keys = false) {}
/**
* Fetch an SNMP object which
* follows the given object id
* @link https://php.net/manual/en/snmp.getnext.php
* @param mixed $object_id <p>
* The <acronym title="Simple Network Management Protocol">SNMP</acronym> object (OID) or objects
* </p>
* @return mixed SNMP objects requested as string or array
* depending on <i>object_id</i> type or <b>FALSE</b> on error.
* @since 5.4
*/
public function getnext($object_id) {}
/**
* Fetch SNMP object subtree
* @link https://php.net/manual/en/snmp.walk.php
* @param string $object_id <p>Root of subtree to be fetched</p>
* @param bool $suffix_as_keys [optional] <p>By default full OID notation is used for keys in output array. If set to <b>TRUE</b> subtree prefix will be removed from keys leaving only suffix of object_id.</p>
* @param int $max_repetitions [optional] <p>This specifies the maximum number of iterations over the repeating variables. The default is to use this value from SNMP object.</p>
* @param int $non_repeaters [optional] <p>This specifies the number of supplied variables that should not be iterated over. The default is to use this value from SNMP object.</p>
* @return array|false associative array of the SNMP object ids and their values on success or <b>FALSE</b> on error.
* When a SNMP error occures <b>SNMP::getErrno</b> and
* <b>SNMP::getError</b> can be used for retrieving error
* number (specific to SNMP extension, see class constants) and error message
* respectively.
* @since 5.4
*/
public function walk($object_id, $suffix_as_keys = false, $max_repetitions, $non_repeaters) {}
/**
* Set the value of an SNMP object
* @link https://php.net/manual/en/snmp.set.php
* @param string $object_id <p>The SNMP object id</p>
* @since 5.4
*
* <p>When count of OIDs in object_id array is greater than
* max_oids object property set method will have to use multiple queries
* to perform requested value updates. In this case type and value checks
* are made per-chunk so second or subsequent requests may fail due to
* wrong type or value for OID requested. To mark this a warning is
* raised when count of OIDs in object_id array is greater than max_oids.
* When count of OIDs in object_id array is greater than max_oids object property set method will have to use multiple queries to perform requested value updates. In this case type and value checks are made per-chunk so second or subsequent requests may fail due to wrong type or value for OID requested. To mark this a warning is raised when count of OIDs in object_id array is greater than max_oids.</p>
* @param mixed $type <p>The MIB defines the type of each object id. It has to be specified as a single character from the below list.</p>
* <b>types:</b>
* <table>
* <tbody>
* <tr><td>=</td><td>The type is taken from the MIB</td></tr>
* <tr><td>i</td><td>INTEGER</td> </tr>
* <tr><td>u</td><td>INTEGER</td></tr>
* <tr><td>s</td><td>STRING</td></tr>
* <tr><td>x</td><td>HEX STRING</td></tr>
* <tr><td>d</td><td>DECIMAL STRING</td></tr>
* <tr><td>n</td><td>NULLOBJ</td></tr>
* <tr><td>o</td><td>OBJID</td></tr>
* <tr><td>t</td><td>TIMETICKS</td></tr>
* <tr><td>a</td><td>IPADDRESS</td></tr>
* <tr><td>b</td><td>BITS</td></tr>
* </tbody>
* </table>
* <p>
* If <b>OPAQUE_SPECIAL_TYPES</b> was defined while compiling the SNMP library, the following are also valid:
* </p>
* <b>types:</b>
* <table>
* <tbody>
* <tr><td>U</td><td>unsigned int64</td></tr>
* <tr><td>I</td><td>signed int64</td></tr>
* <tr><td>F</td><td>float</td></tr>
* <tr><td>D</td><td>double</td></tr>
* </tbody>
* </table>
* <p>
* Most of these will use the obvious corresponding ASN.1 type. 's', 'x', 'd' and 'b' are all different ways of specifying an OCTET STRING value, and
* the 'u' unsigned type is also used for handling Gauge32 values.
* </p>
*
* <p>
* If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or by specifying it in the libsnmp config, '=' may be used as
* the <i>type</i> parameter for all object ids as the type can then be automatically read from the MIB.
* </p>
*
* <p>
* Note that there are two ways to set a variable of the type BITS like e.g.
* "SYNTAX BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4), ssh(5), https(6)}":
* </p>
* <ul>
* <li>
* Using type "b" and a list of bit numbers. This method is not recommended since GET query for the same OID would return e.g. 0xF8.
* </li>
* <li>
* Using type "x" and a hex number but without(!) the usual "0x" prefix.
* </li>
* </ul>
* <p>
* See examples section for more details.
* </p>
* @param mixed $value <p>
* The new value.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function set($object_id, $type, $value) {}
/**
* Get last error code
* @link https://php.net/manual/en/snmp.geterrno.php
* @return int one of SNMP error code values described in constants chapter.
* @since 5.4
*/
public function getErrno() {}
/**
* Get last error message
* @link https://php.net/manual/en/snmp.geterror.php
* @return string String describing error from last SNMP request.
* @since 5.4
*/
public function getError() {}
}
/**

View File

@ -548,6 +548,15 @@ class SoapClient
#[TentativeType]
public function __getTypes(): ?array {}
/**
* Returns a list of all cookies
* @link https://php.net/manual/en/soapclient.getcookies.php
* @return array The array of all cookies
* @since 5.4.3
*/
#[TentativeType]
public function __getCookies(): array {}
/**
* Performs a SOAP request
* @link https://php.net/manual/en/soapclient.dorequest.php

View File

@ -113,6 +113,101 @@ define('PHP_NORMAL_READ', 1);
define('PHP_BINARY_READ', 2);
/**
* Joins a multicast group.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('MCAST_JOIN_GROUP', 42);
/**
* Leaves a multicast group.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('MCAST_LEAVE_GROUP', 45);
/**
* Blocks packets arriving from a specific source to a specific multicast group,
* which must have been previously joined.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('MCAST_BLOCK_SOURCE', 43);
/**
* Unblocks (start receiving again) packets arriving from
* a specific source address to a specific multicast group,
* which must have been previously joined.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('MCAST_UNBLOCK_SOURCE', 44);
/**
* Receive packets destined to a specific multicast group
* whose source address matches a specific value.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('MCAST_JOIN_SOURCE_GROUP', 46);
/**
* Stop receiving packets destined to a specific multicast group
* whose soure address matches a specific value.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('MCAST_LEAVE_SOURCE_GROUP', 47);
/**
* The outgoing interface for IPv4 multicast packets.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('IP_MULTICAST_IF', 32);
/**
* The outgoing interface for IPv6 multicast packets.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('IP_MULTICAST_TTL', 33);
/**
* The multicast loopback policy for IPv4 packets,
* which determines whether multicast packets sent by this socket
* also reach receivers in the same host that have joined the same multicast group
* on the outgoing interface used by this socket. This is the case by default.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('IP_MULTICAST_LOOP', 34);
/**
* Analogous to IP_MULTICAST_LOOP, but for IPv6.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('IPV6_MULTICAST_IF', 17);
/**
* The time-to-live of outgoing IPv4 multicast packets.
* This should be a value between 0 (don't leave the interface) and 255.
* The default value is 1 (only the local network is reached).
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('IPV6_MULTICAST_HOPS', 18);
/**
* Analogous to IP_MULTICAST_TTL, but for IPv6 packets.
* The value -1 is also accepted, meaning the route default should be used.
* @since 5.4
* @link https://php.net/manual/en/function.socket-get-option.php
*/
define('IPV6_MULTICAST_LOOP', 19);
define('IPV6_V6ONLY', 26);
/**
@ -1991,6 +2086,17 @@ function socket_last_error($socket = null): int {}
*/
function socket_clear_error($socket = null): void {}
/**
* Import a stream
* @link https://php.net/manual/en/function.socket-import-stream.php
* @param resource $stream <p>
* The stream resource to import.
* </p>
* @return resource|false|null <b>FALSE</b> or <b>NULL</b> on failure.
* @since 5.4
*/
function socket_import_stream($stream) {}
/**
* Alias of {@see socket_get_option}
* @param $socket

View File

@ -19,6 +19,20 @@ define('__COMPILER_HALT_OFFSET__', 0);
*/
function PS_UNRESERVE_PREFIX___halt_compiler() {}
/**
* Convert hexadecimal string to its binary representation.
*
* If the hexadecimal input string is of odd length or invalid hexadecimal string an <code>E_WARNING</code> level error is emitted.
*
* @link https://php.net/manual/en/function.hex2bin.php
* @param string $string Hexadecimal string to convert.
* @return string|false The binary representation of the given data or <b>FALSE</b> on failure.
* @see bin2hex()
* @see unpack()
* @since 5.4
*/
function hex2bin(string $string): string|false {}
/**
* Get or Set the HTTP response code
* @param int $response_code The optional response_code will set the response code.

View File

@ -46,6 +46,15 @@ define('__FUNCTION__', "");
*/
define('__METHOD__', "");
/**
* The trait name. (Added in PHP 5.4.0) As of PHP 5.4 this constant
* returns the trait as it was declared (case-sensitive). The trait name includes the namespace
* it was declared in (e.g. Foo\Bar).
* @since 5.4
* @link https://php.net/manual/en/language.constants.predefined.php
*/
define('__TRAIT__', "");
/**
* The directory of the file. If used inside an include,
* the directory of the included file is returned. This is equivalent

View File

@ -300,7 +300,7 @@ function wordwrap(string $string, int $width = 75, string $break = "\n", bool $c
* @return string The converted string.
*/
#[Pure]
function htmlspecialchars(string $string, int $flags = ENT_QUOTES, ?string $encoding = null, bool $double_encode = true): string {}
function htmlspecialchars(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding = null, bool $double_encode = true): string {}
/**
* Convert all applicable characters to HTML entities
@ -346,7 +346,7 @@ function htmlspecialchars(string $string, int $flags = ENT_QUOTES, ?string $enco
* @return string the encoded string.
*/
#[Pure]
function htmlentities(string $string, int $flags = ENT_QUOTES, ?string $encoding, bool $double_encode = true): string {}
function htmlentities(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding, bool $double_encode = true): string {}
/**
* Convert HTML entities to their corresponding characters
@ -387,7 +387,7 @@ function htmlentities(string $string, int $flags = ENT_QUOTES, ?string $encoding
* @return string the decoded string.
*/
#[Pure]
function html_entity_decode(string $string, int $flags = ENT_QUOTES, ?string $encoding): string {}
function html_entity_decode(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, ?string $encoding): string {}
/**
* Convert special HTML entities back to characters
@ -421,7 +421,7 @@ function html_entity_decode(string $string, int $flags = ENT_QUOTES, ?string $en
* @return string the decoded string.
*/
#[Pure]
function htmlspecialchars_decode(string $string, int $flags = ENT_QUOTES): string {}
function htmlspecialchars_decode(string $string, int $flags = ENT_QUOTES|ENT_SUBSTITUTE): string {}
/**
* Returns the translation table used by <function>htmlspecialchars</function> and <function>htmlentities</function>
@ -597,7 +597,7 @@ function htmlspecialchars_decode(string $string, int $flags = ENT_QUOTES): strin
* @return array the translation table as an array.
*/
#[Pure]
function get_html_translation_table(int $table = 0, int $flags = ENT_QUOTES): array {}
function get_html_translation_table(int $table = 0, int $flags = ENT_QUOTES|ENT_SUBSTITUTE): array {}
/**
* Calculate the sha1 hash of a string

View File

@ -78,6 +78,40 @@ function closelog(): bool {}
*/
function header_register_callback(callable $callback): bool {}
/**
* Get the size of an image from a string.
* @param string $string The image data, as a string.
* @param array &$image_info [optional] This optional parameter allows you to extract<br>
* some extended information from the image file. Currently, this will <br>
* return the different JPG APP markers as an associative array. <br>
* Some programs use these APP markers to embed text information in images. <br>
* A very common one is to embed » IPTC information in the APP13 marker. <br>
* You can use the iptcparse() function to parse the binary APP13 marker into something readable.
* @return array|false Returns an array with 7 elements.<br>
* Index 0 and 1 contains respectively the width and the height of the image.<br>
* Index 2 is one of the <b>IMAGETYPE_XXX</b> constants indicating the type of the image.<br>
* Index 3 is a text string with the correct <b>height="yyy" width="xxx"</b> string<br>
* that can be used directly in an IMG tag.<br>
* On failure, FALSE is returned.
* @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
* @since 5.4
* @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
* @since 5.4
*/
#[ArrayShape([0 => "int", 1 => "int", 2 => "int", 3 => "string", "bits" => "int", "channels" => "int", "mime" => "string"])]
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|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
*/
function stream_set_chunk_size($stream, int $size): int|false {}
/**
* Initializes all syslog related variables
* @link https://php.net/manual/en/function.define-syslog-variables.php

View File

@ -1253,6 +1253,74 @@ define('PHP_QUERY_RFC3986', 2);
*/
define('SID', "name=ID");
/**
* Return value of session_status() if sessions are disabled.
* @since 5.4
* @link https://php.net/manual/en/function.session-status.php
*/
define('PHP_SESSION_DISABLED', 0);
/**
* Return value of session_status() if sessions are enabled, but no session exists.
* @since 5.4
* @link https://php.net/manual/en/function.session-status.php
*/
define('PHP_SESSION_NONE', 1);
/**
* Return value of session_status() if sessions are enabled, and a session exists.
* @since 5.4
* @link https://php.net/manual/en/function.session-status.php
*/
define('PHP_SESSION_ACTIVE', 2);
/**
* Replace invalid code unit sequences with a Unicode Replacement Character
* U+FFFD (UTF-8) or &#FFFD; (otherwise) instead of returning an empty string.
* @since 5.4
* @link https://php.net/manual/en/function.htmlspecialchars.php
*/
define('ENT_SUBSTITUTE', 8);
/**
* Replace invalid code points for the given document type with
* a Unicode Replacement Character U+FFFD (UTF-8) or &#FFFD;
* (otherwise) instead of leaving them as is. This may be useful,
* for instance, to ensure the well-formedness of XML documents
* with embedded external content.
* @since 5.4
* @link https://php.net/manual/en/function.htmlspecialchars.php
*/
define('ENT_DISALLOWED', 128);
/**
* Handle code as HTML 4.01.
* @since 5.4
* @link https://php.net/manual/en/function.htmlspecialchars.php
*/
define('ENT_HTML401', 0);
/**
* Handle code as XML 1.
* @since 5.4
* @link https://php.net/manual/en/function.htmlspecialchars.php
*/
define('ENT_XML1', 16);
/**
* Handle code as XHTML.
* @since 5.4
* @link https://php.net/manual/en/function.htmlspecialchars.php
*/
define('ENT_XHTML', 32);
/**
* Handle code as HTML 5.
* @since 5.4
* @link https://php.net/manual/en/function.htmlspecialchars.php
*/
define('ENT_HTML5', 48);
/** @link https://php.net/manual/en/function.scandir.php */
define('SCANDIR_SORT_ASCENDING', 0);
@ -1262,6 +1330,20 @@ define('SCANDIR_SORT_DESCENDING', 1);
/** @link https://php.net/manual/en/function.scandir.php */
define('SCANDIR_SORT_NONE', 2);
/**
* SORT_NATURAL is used to compare items as strings using "natural ordering" like natsort().
* @since 5.4
* @link https://php.net/manual/en/array.constants.php
*/
define('SORT_NATURAL', 6);
/**
* SORT_FLAG_CASE can be combined (bitwise OR) with SORT_STRING or SORT_NATURAL to sort strings case-insensitively.
* @since 5.4
* @link https://php.net/manual/en/array.constants.php
*/
define('SORT_FLAG_CASE', 8);
/** @link https://php.net/manual/en/streamwrapper.stream-metadata.php */
define('STREAM_META_TOUCH', 1);

View File

@ -188,4 +188,21 @@ class XSLTProcessor
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setProfiling($filename) {}
/**
* Set security preferences
* @link https://php.net/manual/en/xsltprocessor.setsecurityprefs.php
* @param int $securityPrefs
* @return int
* @since 5.4
*/
public function setSecurityPrefs($securityPrefs) {}
/**
* Get security preferences
* @link https://php.net/manual/en/xsltprocessor.getsecurityprefs.php
* @return int
* @since 5.4
*/
public function getSecurityPrefs() {}
}

View File

@ -403,6 +403,49 @@ function gzinflate(string $data, int $max_length = 0): string|false {}
#[Pure]
function gzencode(string $data, int $level = -1, int $encoding = FORCE_GZIP): string|false {}
/**
* Decodes a gzip compressed string
* @link https://php.net/manual/en/function.gzdecode.php
* @param string $data <p>
* The data to decode, encoded by <b>gzencode</b>.
* </p>
* @param int $max_length <p>
* The maximum length of data to decode.
* </p>
* @return string|false The decoded string, or <b>FALSE</b> if an error occurred.
* @since 5.4
*/
#[Pure]
function gzdecode(string $data, int $max_length = 0): string|false {}
/**
* Compress data with the specified encoding
* @link https://php.net/manual/en/function.zlib-encode.php
* @param string $data <p>
* </p>
* @param int $encoding <p>
* </p>
* @param int $level [optional] default -1 <p>
* </p>
* @return string|false
* @since 5.4
*/
#[Pure]
function zlib_encode(string $data, int $encoding, int $level = -1): string|false {}
/**
* Uncompress any raw/gzip/zlib encoded data
* @link https://php.net/manual/en/function.zlib-decode.php
* @param string $data <p>
* </p>
* @param int $max_length <p>
* </p>
* @return string|false
* @since 5.4
*/
#[Pure]
function zlib_decode(string $data, int $max_length = 0): string|false {}
/**
* Returns the coding type used for output compression
* @link https://php.net/manual/en/function.zlib-get-coding-type.php