PHP 8 stubs

Continue
This commit is contained in:
Maxim.Kolmakov 2020-07-16 18:30:50 +02:00
parent b91de0eb40
commit f23297fad6
22 changed files with 213 additions and 48 deletions

View File

@ -752,6 +752,7 @@ interface Stringable {
// TODO Uncomment after PHP 8.0 release:
// @@Attribute(Attribute::TARGET_CLASS)
final class Attribute {
public int $flags;
/**
* Marks that attribute declaration is allowed only in classes.
*/
@ -812,31 +813,23 @@ class PhpToken implements Stringable {
/**
* One of the T_* constants, or an integer < 256 representing a
* single-char token.
*
* @var int
*/
public $id;
public int $id;
/**
* The textual content of the token.
*
* @var string
*/
public $text;
public string $text;
/**
* The starting line number (1-based) of the token.
*
* @var int
*/
public $line;
public int $line;
/**
* The starting position (0-based) in the tokenized string.
*
* @var int
*/
public $pos;
public int $pos;
/**
* Same as {@see token_get_all()}, but returning array of {@see PhpToken}
@ -896,3 +889,16 @@ class PhpToken implements Stringable {
{
}
}
final class InternalIterator implements Iterator{
private function __construct(){}
public function current(){}
public function next(){}
public function key(){}
public function valid(){}
public function rewind(){}
}

View File

@ -1180,7 +1180,8 @@ class PDO {
* associated result set.
* @link https://php.net/manual/en/class.pdostatement.php
*/
class PDOStatement implements Traversable {
class PDOStatement implements IteratorAggregate
{
/**
* @var string
*/
@ -1584,6 +1585,10 @@ class PDOStatement implements Traversable {
final public function __sleep () {}
/**
* @since 8.0
*/
public function getIterator(){}
}
final class PDORow {

View File

@ -217,6 +217,9 @@ const CLASSES = array (
'Crypto\\PBKDF2Exception' => 'crypto/crypto.php',
'Crypto\\Rand' => 'crypto/crypto.php',
'Crypto\\RandException' => 'crypto/crypto.php',
'CurlHandle' => 'curl/curl.php',
'CurlMultiHandle' => 'curl/curl.php',
'CurlShareHandle' => 'curl/curl.php',
'DOMAttr' => 'dom/dom_c.php',
'DOMCdataSection' => 'dom/dom_c.php',
'DOMCharacterData' => 'dom/dom_c.php',
@ -258,6 +261,7 @@ const CLASSES = array (
'DateTimeInterface' => 'date/date_c.php',
'DateTimeZone' => 'date/date_c.php',
'Decimal\\Decimal' => 'decimal/decimal.php',
'DeflateContext' => 'zlib/zlib.php',
'Directory' => 'standard/standard_0.php',
'DirectoryIterator' => 'SPL/SPL_c1.php',
'DivisionByZeroError' => 'Core/Core_c.php',
@ -370,6 +374,8 @@ const CLASSES = array (
'ImagickPixelIterator' => 'imagick/imagick.php',
'ImagickPixelIteratorException' => 'imagick/imagick.php',
'InfiniteIterator' => 'SPL/SPL.php',
'InflateContext' => 'zlib/zlib.php',
'InternalIterator' => 'Core/Core_c.php',
'IntlBreakIterator' => 'intl/intl.php',
'IntlCalendar' => 'intl/intl.php',
'IntlChar' => 'intl/IntlChar.php',
@ -631,6 +637,7 @@ const CLASSES = array (
'SessionHandlerInterface' => 'session/SessionHandler.php',
'SessionIdInterface' => 'session/SessionHandler.php',
'SessionUpdateTimestampHandlerInterface' => 'session/SessionHandler.php',
'Shmop' => 'shmop/shmop.php',
'SimpleXMLElement' => 'SimpleXML/SimpleXML.php',
'SimpleXMLIterator' => 'SimpleXML/SimpleXML.php',
'SoapClient' => 'soap/soap.php',
@ -675,6 +682,9 @@ const CLASSES = array (
'SyncReaderWriter' => 'sync/sync.php',
'SyncSemaphore' => 'sync/sync.php',
'SyncSharedMemory' => 'sync/sync.php',
'SysvMessageQueue' => 'sysvmsg/sysvmsg.php',
'SysvSemaphore' => 'sysvsem/sysvsem.php',
'SysvSharedMemory' => 'sysvshm/sysvshm.php',
'Thread' => 'pthreads/pthreads.php',
'Threaded' => 'pthreads/pthreads.php',
'Throwable' => 'Core/Core_c.php',
@ -690,6 +700,7 @@ const CLASSES = array (
'V8JsScriptException' => 'v8js/v8js.php',
'V8JsTimeLimitException' => 'v8js/v8js.php',
'VARIANT' => 'com_dotnet/com_dotnet.php',
'ValueError' => 'mbstring/mbstring.php',
'Volatile' => 'pthreads/pthreads.php',
'WeakMap' => 'Core/Core_c.php',
'WeakReference' => 'Core/Core_c.php',
@ -698,6 +709,7 @@ const CLASSES = array (
'XMLWriter' => 'xmlwriter/xmlwriter.php',
'XSLTProcessor' => 'xsl/xsl.php',
'XXTEA' => 'xxtea/xxtea.php',
'XmlParser' => 'xml/xml.php',
'Yaf\\Action_Abstract' => 'yaf/yaf_namespace.php',
'Yaf\\Application' => 'yaf/yaf_namespace.php',
'Yaf\\Bootstrap_Abstract' => 'yaf/yaf_namespace.php',
@ -1954,6 +1966,7 @@ const FUNCTIONS = array (
'fbird_trans' => 'interbase/interbase.php',
'fbird_wait_event' => 'interbase/interbase.php',
'fclose' => 'standard/standard_5.php',
'fdiv' => 'standard/standard_3.php',
'feof' => 'standard/standard_5.php',
'fflush' => 'standard/standard_5.php',
'fgetc' => 'standard/standard_5.php',
@ -2200,6 +2213,7 @@ const FUNCTIONS = array (
'getallheaders' => 'apache/apache.php',
'getcwd' => 'standard/standard_7.php',
'getdate' => 'date/date.php',
'getdir' => 'standard/standard_7.php',
'getenv' => 'standard/standard_3.php',
'gethostbyaddr' => 'standard/standard_4.php',
'gethostbyname' => 'standard/standard_4.php',
@ -2830,6 +2844,7 @@ const FUNCTIONS = array (
'ldap_control_paged_result' => 'ldap/ldap.php',
'ldap_control_paged_result_response' => 'ldap/ldap.php',
'ldap_count_entries' => 'ldap/ldap.php',
'ldap_count_references' => 'ldap/ldap.php',
'ldap_delete' => 'ldap/ldap.php',
'ldap_delete_ext' => 'ldap/ldap.php',
'ldap_dn2ufn' => 'ldap/ldap.php',
@ -3736,6 +3751,11 @@ const FUNCTIONS = array (
'opendir' => 'standard/standard_7.php',
'openlog' => 'standard/standard_7.php',
'openssl_cipher_iv_length' => 'openssl/openssl.php',
'openssl_cms_decrypt' => 'openssl/openssl.php',
'openssl_cms_encrypt' => 'openssl/openssl.php',
'openssl_cms_read' => 'openssl/openssl.php',
'openssl_cms_sign' => 'openssl/openssl.php',
'openssl_cms_verify' => 'openssl/openssl.php',
'openssl_csr_export' => 'openssl/openssl.php',
'openssl_csr_export_to_file' => 'openssl/openssl.php',
'openssl_csr_get_public_key' => 'openssl/openssl.php',
@ -6519,6 +6539,7 @@ const CONSTANTS = array (
'FILTER_SANITIZE_STRIPPED' => 'filter/filter.php',
'FILTER_SANITIZE_URL' => 'filter/filter.php',
'FILTER_UNSAFE_RAW' => 'filter/filter.php',
'FILTER_VALIDATE_BOOL' => 'filter/filter.php',
'FILTER_VALIDATE_BOOLEAN' => 'filter/filter.php',
'FILTER_VALIDATE_DOMAIN' => 'filter/filter.php',
'FILTER_VALIDATE_EMAIL' => 'filter/filter.php',
@ -9509,8 +9530,19 @@ const CONSTANTS = array (
'OPENSSL_CIPHER_RC2_128' => 'openssl/openssl.php',
'OPENSSL_CIPHER_RC2_40' => 'openssl/openssl.php',
'OPENSSL_CIPHER_RC2_64' => 'openssl/openssl.php',
'OPENSSL_CMS_BINARY' => 'openssl/openssl.php',
'OPENSSL_CMS_DETACHED' => 'openssl/openssl.php',
'OPENSSL_CMS_NOATTR' => 'openssl/openssl.php',
'OPENSSL_CMS_NOCERTS' => 'openssl/openssl.php',
'OPENSSL_CMS_NOINTERN' => 'openssl/openssl.php',
'OPENSSL_CMS_NOSIGS' => 'openssl/openssl.php',
'OPENSSL_CMS_NOVERIFY' => 'openssl/openssl.php',
'OPENSSL_CMS_TEXT' => 'openssl/openssl.php',
'OPENSSL_DEFAULT_STREAM_CIPHERS' => 'openssl/openssl.php',
'OPENSSL_DONT_ZERO_PAD_KEY' => 'openssl/openssl.php',
'OPENSSL_ENCODING_DER' => 'openssl/openssl.php',
'OPENSSL_ENCODING_PEM' => 'openssl/openssl.php',
'OPENSSL_ENCODING_SMIME' => 'openssl/openssl.php',
'OPENSSL_KEYTYPE_DH' => 'openssl/openssl.php',
'OPENSSL_KEYTYPE_DSA' => 'openssl/openssl.php',
'OPENSSL_KEYTYPE_EC' => 'openssl/openssl.php',

View File

@ -264,4 +264,22 @@ class ReflectionProperty implements Reflector
final private function __clone()
{
}
/**
* @return bool
* @since 8.0
*/
public function hasDefaultValue(){}
/**
* @return mixed
* @since 8.0
*/
public function getDefaultValue(){}
/**
* @return ReflectionAttribute[]
* @since 8.0
*/
public function getAttributes(?string $name = null, int $flags = 0): array {}
}

View File

@ -694,7 +694,7 @@ class LimitIterator extends IteratorIterator {
* This object supports cached iteration over another iterator.
* @link https://php.net/manual/en/class.cachingiterator.php
*/
class CachingIterator extends IteratorIterator implements ArrayAccess, Countable {
class CachingIterator extends IteratorIterator implements ArrayAccess, Countable, Stringable {
/**
* String conversion flag (mutually exclusive): Uses the current element for the iterator's string conversion.

View File

@ -19,7 +19,7 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator
* @param bool $is_prefix TRUE if ns is a prefix, FALSE if it's a URI; defaults to FALSE.
* @since 5.0.1
*/
final public function __construct ($data, $options = 0, $data_is_url = false, $ns = "", $is_prefix = false) {}
public function __construct ($data, $options = 0, $data_is_url = false, $ns = "", $is_prefix = false) {}
/**
* Provides access to element's children
@ -218,7 +218,7 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator
* @param string|int $offset
* @return bool true on success or false on failure.
*/
private function offsetExists ($offset) {}
public function offsetExists ($offset) {}
/**
* Class provides access to children by position, and attributes by name
@ -226,7 +226,7 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator
* @param string|int $offset
* @return static Either a named attribute or an element from a list of children
*/
private function offsetGet ($offset) {}
public function offsetGet ($offset) {}
/**
* Class provides access to children by position, and attributes by name
@ -235,7 +235,7 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator
* @param mixed $value
* @return void
*/
private function offsetSet ($offset, $value) {}
public function offsetSet ($offset, $value) {}
/**
* Class provides access to children by position, and attributes by name
@ -243,49 +243,58 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Countable, Iterator
* @param string|int $offset
* @return void
*/
private function offsetUnset ($offset) {}
public function offsetUnset ($offset) {}
/**
* Rewind to the first element
* @link https://php.net/manual/en/simplexmliterator.rewind.php
* @return void No value is returned.
*/
private function rewind () {}
public function rewind () {}
/**
* Check whether the current element is valid
* @link https://php.net/manual/en/simplexmliterator.valid.php
* @return bool <b>TRUE</b> if the current element is valid, otherwise <b>FALSE</b>
*/
private function valid () {}
public function valid () {}
/**
* Returns the current element
* @link https://php.net/manual/en/simplexmliterator.current.php
* @return static|null the current element as a <b>SimpleXMLElement</b> object or <b>NULL</b> on failure.
*/
private function current () {}
public function current () {}
/**
* Return current key
* @link https://php.net/manual/en/simplexmliterator.key.php
* @return string|false the XML tag name of the element referenced by the current <b>SimpleXMLIterator</b> object or <b>FALSE</b>
*/
private function key () {}
public function key () {}
/**
* Move to next element
* @link https://php.net/manual/en/simplexmliterator.next.php
* @return void No value is returned.
*/
private function next () {}
public function next () {}
/**
* @return bool
* @since 8.0
*/
public function hasChildren()
{
}
}
/**
* The SimpleXMLIterator provides recursive iteration over all nodes of a <b>SimpleXMLElement</b> object.
* @link https://php.net/manual/en/class.simplexmliterator.php
*/
class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, Countable {
class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, Countable, Stringable {
/**
* Rewind to the first element

View File

@ -77,7 +77,7 @@ class CURLFile {
* to its value. You can manually set this using the
* curl_setopt function.
* </p>
* @return resource|false a cURL handle on success, false on errors.
* @return resource|false|CurlHandle a cURL handle on success, false on errors.
*/
function curl_init ($url = null) {}
@ -2137,7 +2137,7 @@ function curl_share_close ($sh) {}
* (PHP 5 &gt;=5.5.0)<br/>
* Initialize a cURL share handle
* @link https://secure.php.net/manual/en/function.curl-share-init.php
* @return resource Returns resource of type "cURL Share Handle".
* @return resource|CurlShareHandle Returns resource of type "cURL Share Handle".
* @since 5.5
*/
function curl_share_init () {}
@ -2345,7 +2345,7 @@ function curl_close ($ch) {}
/**
* Returns a new cURL multi handle
* @link https://php.net/manual/en/function.curl-multi-init.php
* @return resource|false a cURL multi handle resource on success, false on failure.
* @return resource|false|CurlMultiHandle a cURL multi handle resource on success, false on failure.
*/
function curl_multi_init () {}
@ -2531,3 +2531,18 @@ function curl_share_errno($rh) {}
* @return string
*/
function curl_share_strerror($errno){}
/**
* @since 8.0
*/
final class CurlHandle{}
/**
* @since 8.0
*/
final class CurlMultiHandle{}
/**
* @since 8.0
*/
final class CurlShareHandle{}

View File

@ -308,6 +308,12 @@ class DateTimeImmutable implements DateTimeInterface {
* @return void Initializes a DateTime object.
*/
public function __wakeup() { }
/**
* @return DateTimeImmutable
* @since 8.0
*/
public static function createFromInterface(DateTimeInterface $object){}
}
@ -495,6 +501,12 @@ class DateTime implements DateTimeInterface {
* @return DateTime <p>Returns a new instance of a DateTime object.</p>
*/
public static function __set_state ($array) {}
/**
* @return DateTime
* @since 8.0
*/
public static function createFromInterface(DateTimeInterface $object){}
}
/**
@ -676,7 +688,7 @@ class DateInterval {
* Representation of date period.
* @link https://php.net/manual/en/class.dateperiod.php
*/
class DatePeriod implements Traversable {
class DatePeriod implements IteratorAggregate {
const EXCLUDE_START_DATE = 1;
/**
@ -776,4 +788,9 @@ class DatePeriod implements Traversable {
* @since 7.3.4
*/
public function getRecurrences () {}
/**
* @since 8.0
*/
public function getIterator(){}
}

View File

@ -261,7 +261,7 @@ class DOMNode {
* </p>
* @return string The namespace URI of the node.
*/
public function lookupNamespaceUri ($prefix) {}
public function lookupNamespaceURI ($prefix) {}
/**
* @param DOMNode $arg
@ -325,6 +325,7 @@ class DOMNode {
*/
public function C14NFile ($uri, $exclusive, array $with_comments, array $xpath = null, $ns_prefixes = null) {}
}
/**
@ -1063,7 +1064,7 @@ class DOMDocument extends DOMNode implements DOMParentNode {
* The DOMNodeList class
* @link https://php.net/manual/en/class.domnodelist.php
*/
class DOMNodeList implements Traversable, Countable {
class DOMNodeList implements IteratorAggregate, Countable {
/**
* @var int
@ -1090,6 +1091,10 @@ class DOMNodeList implements Traversable, Countable {
*/
public function count() {}
/**
* @since 8.0
*/
public function getIterator(){}
}
/**
@ -1097,7 +1102,7 @@ class DOMNodeList implements Traversable, Countable {
* @link https://php.net/manual/en/class.domnamednodemap.php
* @property-read int $length The number of nodes in the map. The range of valid child node indices is 0 to length - 1 inclusive.
*/
class DOMNamedNodeMap implements Traversable, Countable {
class DOMNamedNodeMap implements IteratorAggregate, Countable {
/**
* Retrieves a node specified by name
@ -1162,6 +1167,10 @@ class DOMNamedNodeMap implements Traversable, Countable {
*/
public function count() {}
/**
* @since 8.0
*/
public function getIterator(){}
}
/**

View File

@ -391,6 +391,8 @@ class HashContext
private function __construct()
{
}
public function __serialize(){}
}
// End of hash v.1.0
?>

View File

@ -1973,7 +1973,7 @@ class IntlDateFormatter {
public function getErrorMessage() { }
}
class ResourceBundle implements Traversable {
class ResourceBundle implements IteratorAggregate {
/**
* @param $locale
@ -2047,6 +2047,11 @@ class ResourceBundle implements Traversable {
* @return string error message from last bundle object's call.
*/
public function getErrorMessage() { }
/**
* @since 8.0
*/
public function getIterator(){}
}
/**
@ -6291,7 +6296,8 @@ define ('IDNA_ERROR_CONTEXTJ', 4096);
/**
* @since 5.5
*/
class IntlBreakIterator implements Traversable {
class IntlBreakIterator implements IteratorAggregate
{
/* Constants */
const DONE = -1;
const WORD_NONE = 0;
@ -6482,6 +6488,8 @@ class IntlBreakIterator implements Traversable {
* @param string $text
*/
public function setText($text) { }
public function getIterator(){}
}
class IntlRuleBasedBreakIterator extends IntlBreakIterator implements Traversable {

View File

@ -1315,5 +1315,6 @@ define('MB_CASE_FOLD_SIMPLE', 7);
*/
define('MB_ONIGURUMA_VERSION', '6.9.5');
class ValueError extends Error {}
// End of mbstring v.
?>

View File

@ -796,7 +796,8 @@ final class mysqli_warning {
* Implements Traversable since 5.4
* @link https://php.net/manual/en/class.mysqli-result.php
*/
class mysqli_result implements Traversable {
class mysqli_result implements IteratorAggregate
{
/**
* @var int
*/
@ -1136,6 +1137,10 @@ class mysqli_result implements Traversable {
*/
public function free_result () {}
/**
* @since 8.0
*/
public function getIterator(){}
}
/**

View File

@ -100,5 +100,10 @@ function shmop_write ($shmid, $data, $offset) {}
*/
function shmop_delete ($shmid) {}
/**
* @since 8.0
*/
final class Shmop{}
// End of shmop v.
?>

View File

@ -463,7 +463,7 @@ class SoapVar {
* </p>
* @since 5.0.1
*/
public function SoapVar ($data, $encoding, $type_name = null, $type_namespace = null, $node_name = null, $node_namespace = null) {}
public function __construct ($data, $encoding, $type_name = null, $type_namespace = null, $node_name = null, $node_namespace = null) {}
}
@ -513,7 +513,7 @@ class SoapServer {
* </p>
* @since 5.0.1
*/
public function SoapServer ($wsdl, array $options = null) {}
public function __construct ($wsdl, array $options = null) {}
/**
* Sets SoapServer persistence mode
@ -693,7 +693,7 @@ class SoapFault extends Exception {
* </p>
* @since 5.0.1
*/
public function SoapFault ($faultcode, $faultstring, $faultactor = null, $detail = null, $faultname = null, $headerfault = null) {}
public function __construct ($faultcode, $faultstring, $faultactor = null, $detail = null, $faultname = null, $headerfault = null) {}
/**
* Obtain a string representation of a SoapFault
@ -725,7 +725,7 @@ class SoapParam {
* </p>
* @since 5.0.1
*/
public function SoapParam ($data, $name) {}
public function __construct ($data, $name) {}
}

View File

@ -8,6 +8,11 @@
*/
class SQLite3 {
const OK = 'OK';
const DENY = 'DENY';
const IGNORE = 'IGNORE';
const CREATE_INDEX = 'CREATE_INDEX';
/**
* Opens an SQLite database
* @link https://php.net/manual/en/sqlite3.open.php

View File

@ -12,7 +12,7 @@
* Queue permissions. Default to 0666. If the message queue already
* exists, the <i>perms</i> will be ignored.
* </p>
* @return resource a resource handle that can be used to access the System V message queue.
* @return resource|SysvMessageQueue a resource handle that can be used to access the System V message queue.
*/
function msg_get_queue ($key, $perms = 0666) {}
@ -257,5 +257,10 @@ define ('MSG_ENOMSG', 42);
define ('MSG_NOERROR', 2);
define ('MSG_EXCEPT', 4);
/**
* @since 8.0
*/
final class SysvMessageQueue{}
// End of sysvmsg v.
?>

View File

@ -19,7 +19,7 @@
* Specifies if the semaphore should be automatically released on request
* shutdown.
* </p>
* @return resource|false a positive semaphore identifier on success, or <b>FALSE</b> on
* @return resource|false|SysvSemaphore a positive semaphore identifier on success, or <b>FALSE</b> on
* error.
*/
function sem_get ($key, $max_acquire = 1, $perm = 0666, $auto_release = 1) {}
@ -62,5 +62,10 @@ function sem_release ($sem_identifier) {}
*/
function sem_remove ($sem_identifier) {}
/**
* @since 8.0
*/
final class SysvSemaphore{}
// End of sysvsem v.
?>

View File

@ -16,7 +16,7 @@
* @param int $perm [optional] <p>
* The optional permission bits. Default to 0666.
* </p>
* @return resource a shared memory segment identifier.
* @return resource|SysvSharedMemory a shared memory segment identifier.
*/
function shm_attach ($key, $memsize = null, $perm = 0666) {}
@ -102,5 +102,11 @@ function shm_get_var ($shm_identifier, $variable_key) {}
*/
function shm_remove_var ($shm_identifier, $variable_key) {}
/**
* @since 8.0
*/
final class SysvSharedMemory{}
// End of sysvshm v.
?>

View File

@ -18,7 +18,7 @@
* encodings are ISO-8859-1, UTF-8 and
* US-ASCII.
* </p>
* @return resource|false a resource handle for the new XML parser.
* @return resource|false|XmlParser a resource handle for the new XML parser.
*/
function xml_parser_create ($encoding = null) {}
@ -41,7 +41,7 @@ function xml_parser_create ($encoding = null) {}
* handler functions will consist of namespace and tag name separated by
* the string specified in <i>separator</i>.
* </p>
* @return resource|false a resource handle for the new XML parser.
* @return resource|false|XmlParser a resource handle for the new XML parser.
*/
function xml_parser_create_ns ($encoding = null, $separator = ':') {}
@ -539,5 +539,7 @@ define ('XML_OPTION_SKIP_WHITE', 4);
*/
define ('XML_SAX_IMPL', "libxml");
class XmlParser{}
// End of xml v.
?>

View File

@ -271,7 +271,7 @@ class XMLReader {
* <b>XMLReader</b> or <b>FALSE</b> on failure.
* @since 5.1.2
*/
public function open ($URI, $encoding = null, $options = 0) {}
public static function open ($URI, $encoding = null, $options = 0) {}
/**
* Move to next node in document
@ -378,7 +378,7 @@ class XMLReader {
* <b>XMLReader</b> or <b>FALSE</b> on failure.
* @since 5.1.2
*/
public function XML ($source, $encoding = null, $options = 0) {}
public static function XML ($source, $encoding = null, $options = 0) {}
/**
* Returns a copy of the current node as a DOM object

View File

@ -410,7 +410,7 @@ function ob_gzhandler ($buffer, $mode) {}
* <b>ZLIB_RLE</b>, <b>ZLIB_FIXED</b> or <b>ZLIB_DEFAULT_STRATEGY</b> (the
* default). <b>dictionary</b>A string or an array of strings of the preset
* dictionary (default: no preset dictionary).</p>
* @return resource|false <p>
* @return resource|false|DeflateContext <p>
* Returns a deflate context resource (zlib.deflate) on success, or
* <b>FALSE</b> on failure.
* </p>
@ -456,7 +456,7 @@ function deflate_add ($context, $data, $flush_mode = ZLIB_SYNC_FLUSH) {}
* <b>ZLIB_RLE</b>, <b>ZLIB_FIXED</b> or <b>ZLIB_DEFAULT_STRATEGY</b> (the
* default). <b>dictionary</b>A string or an array of strings of the preset
* dictionary (default: no preset dictionary).</p>
* @return resource|false <p>
* @return resource|false|InflateContext <p>
* Returns an inflate context resource (zlib.inflate) on success, or
* <b>FALSE</b> on failure.
* </p>
@ -501,6 +501,16 @@ function inflate_get_read_len ($context){}
*/
function inflate_get_status($context) {}
/**
* @since 8.0
*/
class InflateContext{}
/**
* @since 8.0
*/
class DeflateContext{}
define ('FORCE_GZIP', 31);
define ('FORCE_DEFLATE', 15);
/** @link https://php.net/manual/en/zlib.constants.php */