Generate class entries from stubs for another batch of extensions

Closes GH-6669
This commit is contained in:
Máté Kocsis 2021-02-05 13:46:46 +01:00
parent 882b418a01
commit 98fb565c74
No known key found for this signature in database
GPG key ID: FD055E41728BF310
35 changed files with 314 additions and 86 deletions

View file

@ -186,11 +186,7 @@ static void php_enchant_dict_free(zend_object *object) /* {{{ */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(enchant)
{
zend_class_entry bce, dce;
INIT_CLASS_ENTRY(bce, "EnchantBroker", class_EnchantBroker_methods);
enchant_broker_ce = zend_register_internal_class(&bce);
enchant_broker_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
enchant_broker_ce = register_class_EnchantBroker();
enchant_broker_ce->create_object = enchant_broker_create_object;
enchant_broker_ce->serialize = zend_class_serialize_deny;
enchant_broker_ce->unserialize = zend_class_unserialize_deny;
@ -200,9 +196,7 @@ PHP_MINIT_FUNCTION(enchant)
enchant_broker_handlers.free_obj = php_enchant_broker_free;
enchant_broker_handlers.clone_obj = NULL;
INIT_CLASS_ENTRY(dce, "EnchantDictionary", class_EnchantDictionary_methods);
enchant_dict_ce = zend_register_internal_class(&dce);
enchant_dict_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
enchant_dict_ce = register_class_EnchantDictionary();
enchant_dict_ce->create_object = enchant_dict_create_object;
enchant_dict_ce->serialize = zend_class_serialize_deny;
enchant_dict_ce->unserialize = zend_class_unserialize_deny;

View file

@ -1,11 +1,16 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
/** @strict-properties */
final class EnchantBroker
{
}
/** @strict-properties */
final class EnchantDictionary
{
}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 31f7c4cd39e58d6474b90acd65f4b7bda7a6ddf3 */
* Stub hash: ec1ad38320dfec1e567b0f0062dbc032c425945c */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE)
ZEND_END_ARG_INFO()
@ -157,3 +157,26 @@ static const zend_function_entry class_EnchantBroker_methods[] = {
static const zend_function_entry class_EnchantDictionary_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_EnchantBroker()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "EnchantBroker", class_EnchantBroker_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
return class_entry;
}
zend_class_entry *register_class_EnchantDictionary()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "EnchantDictionary", class_EnchantDictionary_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
return class_entry;
}

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
function exif_tagname(int $index): string|false {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: ef23ff502ea9658af29e50d57366c281f7a7eb6c */
* Stub hash: 3dde1567a65ab31bd5722ea6d568050420f89439 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
@ -37,3 +37,4 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(exif_imagetype, arginfo_exif_imagetype)
ZEND_FE_END
};

View file

@ -4880,22 +4880,15 @@ static int zend_ffi_preload(char *preload) /* {{{ */
/* {{{ ZEND_MINIT_FUNCTION */
ZEND_MINIT_FUNCTION(ffi)
{
zend_class_entry ce;
REGISTER_INI_ENTRIES();
FFI_G(is_cli) = strcmp(sapi_module.name, "cli") == 0;
INIT_NS_CLASS_ENTRY(ce, "FFI", "Exception", NULL);
zend_ffi_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_error);
zend_ffi_exception_ce = register_class_FFI_Exception(zend_ce_error);
INIT_NS_CLASS_ENTRY(ce, "FFI", "ParserException", NULL);
zend_ffi_parser_exception_ce = zend_register_internal_class_ex(&ce, zend_ffi_exception_ce);
zend_ffi_parser_exception_ce->ce_flags |= ZEND_ACC_FINAL;
zend_ffi_parser_exception_ce = register_class_FFI_ParserException(zend_ffi_exception_ce);
INIT_CLASS_ENTRY(ce, "FFI", class_FFI_methods);
zend_ffi_ce = zend_register_internal_class(&ce);
zend_ffi_ce->ce_flags |= ZEND_ACC_FINAL;
zend_ffi_ce = register_class_FFI();
zend_ffi_ce->create_object = zend_ffi_new;
zend_ffi_ce->serialize = zend_class_serialize_deny;
zend_ffi_ce->unserialize = zend_class_unserialize_deny;
@ -4930,9 +4923,7 @@ ZEND_MINIT_FUNCTION(ffi)
zend_declare_class_constant_long(zend_ffi_ce, "__BIGGEST_ALIGNMENT__", sizeof("__BIGGEST_ALIGNMENT__")-1, __BIGGEST_ALIGNMENT__);
INIT_NS_CLASS_ENTRY(ce, "FFI", "CData", NULL);
zend_ffi_cdata_ce = zend_register_internal_class(&ce);
zend_ffi_cdata_ce->ce_flags |= ZEND_ACC_FINAL;
zend_ffi_cdata_ce = register_class_FFI_CData();
zend_ffi_cdata_ce->create_object = zend_ffi_cdata_new;
zend_ffi_cdata_ce->get_iterator = zend_ffi_cdata_get_iterator;
zend_ffi_cdata_ce->serialize = zend_class_serialize_deny;
@ -5008,9 +4999,7 @@ ZEND_MINIT_FUNCTION(ffi)
zend_ffi_cdata_free_handlers.get_properties = zend_fake_get_properties;
zend_ffi_cdata_free_handlers.get_gc = zend_fake_get_gc;
INIT_NS_CLASS_ENTRY(ce, "FFI", "CType", class_FFI_CType_methods);
zend_ffi_ctype_ce = zend_register_internal_class(&ce);
zend_ffi_ctype_ce->ce_flags |= ZEND_ACC_FINAL;
zend_ffi_ctype_ce = register_class_FFI_CType();
zend_ffi_ctype_ce->create_object = zend_ffi_ctype_new;
zend_ffi_ctype_ce->serialize = zend_class_serialize_deny;
zend_ffi_ctype_ce->unserialize = zend_class_unserialize_deny;

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
namespace {
@ -68,8 +71,17 @@ final class FFI
namespace FFI {
final class CData {
}
final class CType {
public function getName() : string {}
}
class Exception extends \Error {
}
final class ParserException extends Exception {
}
}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 5aeec68fea7a94cd643464acfb10bf4cfcc863da */
* Stub hash: f8eb234b7efa2060f54ed300fc6fa697741b0ab6 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
@ -125,7 +125,77 @@ static const zend_function_entry class_FFI_methods[] = {
};
static const zend_function_entry class_FFI_CData_methods[] = {
ZEND_FE_END
};
static const zend_function_entry class_FFI_CType_methods[] = {
ZEND_ME(FFI_CType, getName, arginfo_class_FFI_CType_getName, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
static const zend_function_entry class_FFI_Exception_methods[] = {
ZEND_FE_END
};
static const zend_function_entry class_FFI_ParserException_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_FFI()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "FFI", class_FFI_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL;
return class_entry;
}
zend_class_entry *register_class_FFI_CData()
{
zend_class_entry ce, *class_entry;
INIT_NS_CLASS_ENTRY(ce, "FFI", "CData", class_FFI_CData_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL;
return class_entry;
}
zend_class_entry *register_class_FFI_CType()
{
zend_class_entry ce, *class_entry;
INIT_NS_CLASS_ENTRY(ce, "FFI", "CType", class_FFI_CType_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL;
return class_entry;
}
zend_class_entry *register_class_FFI_Exception(zend_class_entry *class_entry_Error)
{
zend_class_entry ce, *class_entry;
INIT_NS_CLASS_ENTRY(ce, "FFI", "Exception", class_FFI_Exception_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_Error);
return class_entry;
}
zend_class_entry *register_class_FFI_ParserException(zend_class_entry *class_entry_FFI_Exception)
{
zend_class_entry ce, *class_entry;
INIT_NS_CLASS_ENTRY(ce, "FFI", "ParserException", class_FFI_ParserException_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_FFI_Exception);
class_entry->ce_flags |= ZEND_ACC_FINAL;
return class_entry;
}

View file

@ -107,9 +107,7 @@ PHP_FILEINFO_API zend_object *finfo_objects_new(zend_class_entry *class_type)
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(finfo)
{
zend_class_entry _finfo_class_entry;
INIT_CLASS_ENTRY(_finfo_class_entry, "finfo", class_finfo_methods);
finfo_class_entry = zend_register_internal_class(&_finfo_class_entry);
finfo_class_entry = register_class_finfo();
finfo_class_entry->create_object = finfo_objects_new;
finfo_class_entry->serialize = zend_class_serialize_deny;
finfo_class_entry->unserialize = zend_class_unserialize_deny;

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
class finfo
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 1282a20b1d007bbcc9c0d4efe400db43a5450307 */
* Stub hash: ae5759febdd7ad434c8bf2e23e9da334ff9054dd */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
@ -81,3 +81,14 @@ static const zend_function_entry class_finfo_methods[] = {
ZEND_ME_MAPPING(set_flags, finfo_set_flags, arginfo_class_finfo_set_flags, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_finfo()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "finfo", class_finfo_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
function filter_has_var(int $input_type, string $var_name): bool {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: b5f2e4a79eb6f30fe143b3086845435d0a0a6ef0 */
* Stub hash: dc73178b6c82437ae4eec49984613563018d3bde */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_filter_has_var, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, input_type, IS_LONG, 0)
@ -58,3 +58,4 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(filter_id, arginfo_filter_id)
ZEND_FE_END
};

View file

@ -1,6 +1,14 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
/** @strict-properties */
final class FTPConnection
{
}
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): FTPConnection|false {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 151310a13eeeb2bbf4df1ab38a3a29506b26a570 */
* Stub hash: d72294d567338c30f627b8247a8cc27148237e41 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ftp_connect, 0, 1, FTPConnection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, hostname, IS_STRING, 0)
@ -274,3 +274,20 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(ftp_get_option, arginfo_ftp_get_option)
ZEND_FE_END
};
static const zend_function_entry class_FTPConnection_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_FTPConnection()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "FTPConnection", class_FTPConnection_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
return class_entry;
}

View file

@ -97,8 +97,6 @@ static void ftp_object_destroy(zend_object *zobj) {
PHP_MINIT_FUNCTION(ftp)
{
zend_class_entry ce;
#ifdef HAVE_FTP_SSL
#if OPENSSL_VERSION_NUMBER < 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
SSL_library_init();
@ -110,9 +108,7 @@ PHP_MINIT_FUNCTION(ftp)
#endif
#endif
INIT_CLASS_ENTRY(ce, "FTPConnection", NULL);
php_ftp_ce = zend_register_internal_class(&ce);
php_ftp_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
php_ftp_ce = register_class_FTPConnection();
php_ftp_ce->create_object = ftp_object_create;
php_ftp_ce->serialize = zend_class_serialize_deny;
php_ftp_ce->unserialize = zend_class_unserialize_deny;

View file

@ -217,10 +217,7 @@ void php_gd_assign_libgdimageptr_as_extgdimage(zval *val, gdImagePtr image)
static void php_gd_object_minit_helper()
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "GdImage", class_GdImage_methods);
gd_image_ce = zend_register_internal_class(&ce);
gd_image_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
gd_image_ce = register_class_GdImage();
gd_image_ce->create_object = php_gd_image_object_create;
gd_image_ce->serialize = zend_class_serialize_deny;
gd_image_ce->unserialize = zend_class_unserialize_deny;
@ -287,10 +284,7 @@ static zend_function *php_gd_font_object_get_constructor(zend_object *object)
static void php_gd_font_minit_helper()
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "GdFont", class_GdFont_methods);
gd_font_ce = zend_register_internal_class(&ce);
gd_font_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
gd_font_ce = register_class_GdFont();
gd_font_ce->create_object = php_gd_font_object_create;
gd_font_ce->serialize = zend_class_serialize_deny;
gd_font_ce->unserialize = zend_class_unserialize_deny;

View file

@ -1,8 +1,13 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
/** @strict-properties */
final class GdImage {}
/** @strict-properties */
final class GdFont {}
function gd_info(): array {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 23b7c8395c628239fb10d746ca6bba72871ee9f3 */
* Stub hash: 174cec5de1eb55d1fe837648255ee56553cdad6e */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
@ -836,3 +836,26 @@ static const zend_function_entry class_GdImage_methods[] = {
static const zend_function_entry class_GdFont_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_GdImage()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "GdImage", class_GdImage_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
return class_entry;
}
zend_class_entry *register_class_GdFont()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "GdFont", class_GdFont_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
return class_entry;
}

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
function textdomain(?string $domain): string {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 3fbd90b87dfcbc5a1a0a2aea8d0cc45516e221ce */
* Stub hash: 4a111861e8302c685ba08073dacf9f120307d89a */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_textdomain, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 1)
@ -102,3 +102,4 @@ static const zend_function_entry ext_functions[] = {
#endif
ZEND_FE_END
};

View file

@ -527,9 +527,7 @@ static ZEND_GINIT_FUNCTION(gmp)
/* {{{ ZEND_MINIT_FUNCTION */
ZEND_MINIT_FUNCTION(gmp)
{
zend_class_entry tmp_ce;
INIT_CLASS_ENTRY(tmp_ce, "GMP", class_GMP_methods);
gmp_ce = zend_register_internal_class(&tmp_ce);
gmp_ce = register_class_GMP();
gmp_ce->create_object = gmp_create_object;
gmp_ce->serialize = gmp_serialize;
gmp_ce->unserialize = gmp_unserialize;

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
class GMP
{

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: a1eb4fd58c0b2155692611386c77035f1ef11c2c */
* Stub hash: 97664dc0e71160eacf28f604964df4e9bc97fde5 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_gmp_init, 0, 1, GMP, 0)
ZEND_ARG_TYPE_MASK(0, num, MAY_BE_LONG|MAY_BE_STRING, NULL)
@ -296,3 +296,14 @@ static const zend_function_entry ext_functions[] = {
static const zend_function_entry class_GMP_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_GMP()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "GMP", class_GMP_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
return class_entry;
}

View file

@ -1557,8 +1557,6 @@ PHP_METHOD(HashContext, __unserialize)
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(hash)
{
zend_class_entry ce;
zend_hash_init(&php_hash_hashtable, 35, NULL, NULL, 1);
php_hash_register_algo("md2", &php_hash_md2_ops);
@ -1627,9 +1625,7 @@ PHP_MINIT_FUNCTION(hash)
REGISTER_LONG_CONSTANT("HASH_HMAC", PHP_HASH_HMAC, CONST_CS | CONST_PERSISTENT);
INIT_CLASS_ENTRY(ce, "HashContext", class_HashContext_methods);
php_hashcontext_ce = zend_register_internal_class(&ce);
php_hashcontext_ce->ce_flags |= ZEND_ACC_FINAL;
php_hashcontext_ce = register_class_HashContext();
php_hashcontext_ce->create_object = php_hashcontext_create;
memcpy(&php_hashcontext_handlers, &std_object_handlers,

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
function hash(string $algo, string $data, bool $binary = false, array $options = []): string|false {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: e8466049fca2eae179adbc19bb67e71f6486ec4e */
* Stub hash: 58f4af6d45c5e69afd2bcee3207397654980f13e */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_hash, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
@ -204,3 +204,15 @@ static const zend_function_entry class_HashContext_methods[] = {
ZEND_ME(HashContext, __unserialize, arginfo_class_HashContext___unserialize, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
zend_class_entry *register_class_HashContext()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "HashContext", class_HashContext_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL;
return class_entry;
}

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
function iconv_strlen(string $string, ?string $encoding = null): int|false {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 5d05deb60466c6e1ee73b44ad0b09a032bc8410e */
* Stub hash: c301856deffe269e4bbf1554d9eba4d5cbbb20e8 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@ -85,3 +85,4 @@ static const zend_function_entry ext_functions[] = {
ZEND_FE(iconv_get_encoding, arginfo_iconv_get_encoding)
ZEND_FE_END
};

View file

@ -444,7 +444,6 @@ static PHP_GINIT_FUNCTION(imap)
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(imap)
{
zend_class_entry ce;
unsigned long sa_all = SA_MESSAGES | SA_RECENT | SA_UNSEEN | SA_UIDNEXT | SA_UIDVALIDITY;
REGISTER_INI_ENTRIES();
@ -478,10 +477,7 @@ PHP_MINIT_FUNCTION(imap)
ssl_onceonlyinit ();
#endif
INIT_CLASS_ENTRY(ce, "IMAPConnection", class_IMAPConnection_methods);
php_imap_ce = zend_register_internal_class(&ce);
php_imap_ce->ce_flags |= ZEND_ACC_FINAL | ZEND_ACC_NO_DYNAMIC_PROPERTIES;
php_imap_ce = register_class_IMAPConnection();
php_imap_ce->create_object = imap_object_create;
php_imap_ce->serialize = zend_class_serialize_deny;
php_imap_ce->unserialize = zend_class_unserialize_deny;

View file

@ -1,8 +1,12 @@
<?php
/** @generate-function-entries */
final class IMAPConnection {
/**
* @generate-function-entries
* @generate-class-entries
*/
/** @strict-properties */
final class IMAPConnection {
}
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []): IMAPConnection|false {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 2b4a654a6a247e59e3213715ecee9c7b837b0249 */
* Stub hash: a1e3bdfdd48746db4743e1667d7ba53832160142 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAPConnection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
@ -517,3 +517,15 @@ static const zend_function_entry ext_functions[] = {
static const zend_function_entry class_IMAPConnection_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_IMAPConnection()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "IMAPConnection", class_IMAPConnection_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
return class_entry;
}

View file

@ -44,13 +44,9 @@ PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json)
/* {{{ MINIT */
static PHP_MINIT_FUNCTION(json)
{
zend_class_entry ce;
php_json_serializable_ce = register_class_JsonSerializable();
INIT_CLASS_ENTRY(ce, "JsonSerializable", class_JsonSerializable_methods);
php_json_serializable_ce = zend_register_internal_interface(&ce);
INIT_CLASS_ENTRY(ce, "JsonException", NULL);
php_json_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_exception);
php_json_exception_ce = register_class_JsonException(zend_ce_exception);
/* options for json_encode */
PHP_JSON_REGISTER_CONSTANT("JSON_HEX_TAG", PHP_JSON_HEX_TAG);

View file

@ -1,6 +1,9 @@
<?php
/** @generate-function-entries */
/**
* @generate-function-entries
* @generate-class-entries
*/
function json_encode(mixed $value, int $flags = 0, int $depth = 512): string|false {}
@ -15,3 +18,7 @@ interface JsonSerializable
/** @return mixed */
public function jsonSerialize();
}
class JsonException extends Exception
{
}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 2d1e6c422221ec7efbbd540ee777a5ce2c639943 */
* Stub hash: bb9d306951484ce32054dff31dde37638f2841dc */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_json_encode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
@ -43,3 +43,29 @@ static const zend_function_entry class_JsonSerializable_methods[] = {
ZEND_ABSTRACT_ME_WITH_FLAGS(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
ZEND_FE_END
};
static const zend_function_entry class_JsonException_methods[] = {
ZEND_FE_END
};
zend_class_entry *register_class_JsonSerializable()
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "JsonSerializable", class_JsonSerializable_methods);
class_entry = zend_register_internal_interface(&ce);
return class_entry;
}
zend_class_entry *register_class_JsonException(zend_class_entry *class_entry_Exception)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "JsonException", class_JsonException_methods);
class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
return class_entry;
}