1. Internal API changes
a. php_sys_symlink() and php_sys_link()
b. zend_lookup_class_ex() and zend_fetch_class_by_name()
+ c. Function flags
2. Build system changes
a. Unix build system changes
changed to accept optional lower-case class name as zend_string*,
instead of zval*.
+ c. Function flags changes
+ - ZEND_ACC_CTOR and ZEND_ACC_DTOR are removed. It's pissible to check if
+ method is a constructor/destructor using the following condintion
+ (func->commpon.scope->constructor == func).
+ - ZEND_ACC_IMPLEMENTED_ABSTRACT is removed (it was used only internally
+ during inheritance).
+
========================
2. Build system changes
========================
scope->__isset = __isset;
scope->__debugInfo = __debugInfo;
if (ctor) {
- ctor->common.fn_flags |= ZEND_ACC_CTOR;
if (ctor->common.fn_flags & ZEND_ACC_STATIC) {
zend_error(error_type, "Constructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(ctor->common.function_name));
}
ctor->common.fn_flags &= ~ZEND_ACC_ALLOW_STATIC;
}
if (dtor) {
- dtor->common.fn_flags |= ZEND_ACC_DTOR;
if (dtor->common.fn_flags & ZEND_ACC_STATIC) {
zend_error(error_type, "Destructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(dtor->common.function_name));
}
}
}
- if (ctor && ctor->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE && ctor->common.fn_flags & ZEND_ACC_CTOR) {
+ if (ctor && (ctor->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) {
zend_error_noreturn(E_CORE_ERROR, "Constructor %s::%s() cannot declare a return type", ZSTR_VAL(scope->name), ZSTR_VAL(ctor->common.function_name));
}
- if (dtor && dtor->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE && dtor->common.fn_flags & ZEND_ACC_DTOR) {
+ if (dtor && (dtor->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) {
zend_error_noreturn(E_CORE_ERROR, "Destructor %s::%s() cannot declare a return type", ZSTR_VAL(scope->name), ZSTR_VAL(dtor->common.function_name));
}
if (!key) {
ZVAL_STR_COPY(&method_name, mptr->common.function_name);
zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &method_name);
- } else if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0 ||
+ } else if (mptr->common.scope->constructor != mptr ||
mptr->common.scope == ce ||
zend_binary_strcasecmp(ZSTR_VAL(key), ZSTR_LEN(key), ZSTR_VAL(mptr->common.function_name), len) == 0) {
}
if (ce->constructor) {
- ce->constructor->common.fn_flags |= ZEND_ACC_CTOR;
if (ce->constructor->common.fn_flags & ZEND_ACC_STATIC) {
zend_error_noreturn(E_COMPILE_ERROR, "Constructor %s::%s() cannot be static",
ZSTR_VAL(ce->name), ZSTR_VAL(ce->constructor->common.function_name));
}
}
if (ce->destructor) {
- ce->destructor->common.fn_flags |= ZEND_ACC_DTOR;
if (ce->destructor->common.fn_flags & ZEND_ACC_STATIC) {
zend_error_noreturn(E_COMPILE_ERROR, "Destructor %s::%s() cannot be static",
ZSTR_VAL(ce->name), ZSTR_VAL(ce->destructor->common.function_name));
/* Abstarct method | | | */
#define ZEND_ACC_ABSTRACT (1 << 1) /* | X | | */
/* | | | */
-/* TODO: used only during inheritance ??? | | | */
-#define ZEND_ACC_IMPLEMENTED_ABSTRACT (1 << 3) /* | X | | */
-/* | | | */
#define ZEND_ACC_FAKE_CLOSURE (1 << 6) /* | X | | */
/* | | | */
/* method flag used by Closure::__invoke() | | | */
#define ZEND_ACC_USER_ARG_INFO (1 << 7) /* | X | | */
/* | | | */
-/* method flags (special method detection) | | | */
-#define ZEND_ACC_CTOR (1 << 13) /* | X | | */
-#define ZEND_ACC_DTOR (1 << 14) /* | X | | */
-/* | | | */
/* "main" op_array with | | | */
/* ZEND_DECLARE_INHERITED_CLASS_DELAYED opcodes | | | */
#define ZEND_ACC_EARLY_BINDING (1 << 15) /* | X | | */
static void do_inherit_parent_constructor(zend_class_entry *ce) /* {{{ */
{
- ZEND_ASSERT(ce->parent != NULL);
+ zend_class_entry *parent = ce->parent;
+
+ ZEND_ASSERT(parent != NULL);
/* You cannot change create_object */
- ce->create_object = ce->parent->create_object;
+ ce->create_object = parent->create_object;
/* Inherit special functions if needed */
if (EXPECTED(!ce->get_iterator)) {
- ce->get_iterator = ce->parent->get_iterator;
+ ce->get_iterator = parent->get_iterator;
}
- if (EXPECTED(!ce->iterator_funcs_ptr) && UNEXPECTED(ce->parent->iterator_funcs_ptr)) {
+ if (EXPECTED(!ce->iterator_funcs_ptr) && UNEXPECTED(parent->iterator_funcs_ptr)) {
if (ce->type == ZEND_INTERNAL_CLASS) {
ce->iterator_funcs_ptr = calloc(1, sizeof(zend_class_iterator_funcs));
- if (ce->parent->iterator_funcs_ptr->zf_new_iterator) {
+ if (parent->iterator_funcs_ptr->zf_new_iterator) {
ce->iterator_funcs_ptr->zf_new_iterator = zend_hash_str_find_ptr(&ce->function_table, "getiterator", sizeof("getiterator") - 1);
}
- if (ce->parent->iterator_funcs_ptr->zf_current) {
+ if (parent->iterator_funcs_ptr->zf_current) {
ce->iterator_funcs_ptr->zf_rewind = zend_hash_str_find_ptr(&ce->function_table, "rewind", sizeof("rewind") - 1);
ce->iterator_funcs_ptr->zf_valid = zend_hash_str_find_ptr(&ce->function_table, "valid", sizeof("valid") - 1);
ce->iterator_funcs_ptr->zf_key = zend_hash_str_find_ptr(&ce->function_table, "key", sizeof("key") - 1);
}
}
if (EXPECTED(!ce->__get)) {
- ce->__get = ce->parent->__get;
+ ce->__get = parent->__get;
}
if (EXPECTED(!ce->__set)) {
- ce->__set = ce->parent->__set;
+ ce->__set = parent->__set;
}
if (EXPECTED(!ce->__unset)) {
- ce->__unset = ce->parent->__unset;
+ ce->__unset = parent->__unset;
}
if (EXPECTED(!ce->__isset)) {
- ce->__isset = ce->parent->__isset;
+ ce->__isset = parent->__isset;
}
if (EXPECTED(!ce->__call)) {
- ce->__call = ce->parent->__call;
+ ce->__call = parent->__call;
}
if (EXPECTED(!ce->__callstatic)) {
- ce->__callstatic = ce->parent->__callstatic;
+ ce->__callstatic = parent->__callstatic;
}
if (EXPECTED(!ce->__tostring)) {
- ce->__tostring = ce->parent->__tostring;
+ ce->__tostring = parent->__tostring;
}
if (EXPECTED(!ce->clone)) {
- ce->clone = ce->parent->clone;
+ ce->clone = parent->clone;
}
if (EXPECTED(!ce->serialize)) {
- ce->serialize = ce->parent->serialize;
+ ce->serialize = parent->serialize;
}
if (EXPECTED(!ce->unserialize)) {
- ce->unserialize = ce->parent->unserialize;
+ ce->unserialize = parent->unserialize;
}
if (!ce->destructor) {
- ce->destructor = ce->parent->destructor;
+ ce->destructor = parent->destructor;
}
if (EXPECTED(!ce->__debugInfo)) {
- ce->__debugInfo = ce->parent->__debugInfo;
+ ce->__debugInfo = parent->__debugInfo;
}
if (ce->constructor) {
- if (ce->parent->constructor && UNEXPECTED(ce->parent->constructor->common.fn_flags & ZEND_ACC_FINAL)) {
+ if (parent->constructor && UNEXPECTED(parent->constructor->common.fn_flags & ZEND_ACC_FINAL)) {
zend_error_noreturn(E_ERROR, "Cannot override final %s::%s() with %s::%s()",
- ZSTR_VAL(ce->parent->name), ZSTR_VAL(ce->parent->constructor->common.function_name),
+ ZSTR_VAL(parent->name), ZSTR_VAL(parent->constructor->common.function_name),
ZSTR_VAL(ce->name), ZSTR_VAL(ce->constructor->common.function_name));
}
return;
}
- ce->constructor = ce->parent->constructor;
+ ce->constructor = parent->constructor;
}
/* }}} */
* we still need to do the arg number checks. We are only willing to ignore this for internal
* functions because extensions don't always define arg_info.
*/
- if (!proto || (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION)) {
+ if (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION) {
return 1;
}
/* Checks for constructors only if they are declared in an interface,
* or explicitly marked as abstract
*/
- if ((fe->common.fn_flags & ZEND_ACC_CTOR)
+ if ((fe->common.scope->constructor == fe)
&& ((proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0
&& (proto->common.fn_flags & ZEND_ACC_ABSTRACT) == 0)) {
return 1;
zend_error_noreturn(E_COMPILE_ERROR, "Cannot make non abstract method %s::%s() abstract in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZEND_FN_SCOPE_NAME(child));
}
- /* Prevent derived classes from restricting access that was available in parent classes (except deriving from non-abstract ctors) */
- if (UNEXPECTED((!(child_flags & ZEND_ACC_CTOR) || (parent_flags & (ZEND_ACC_ABSTRACT | ZEND_ACC_IMPLEMENTED_ABSTRACT))) &&
- (child_flags & ZEND_ACC_PPP_MASK) > (parent_flags & ZEND_ACC_PPP_MASK))) {
- zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::%s() must be %s (as in class %s)%s", ZEND_FN_SCOPE_NAME(child), ZSTR_VAL(child->common.function_name), zend_visibility_string(parent_flags), ZEND_FN_SCOPE_NAME(parent), (parent_flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
- }
-
if ((child_flags & ZEND_ACC_PRIVATE) < (parent_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_CHANGED))) {
child->common.fn_flags |= ZEND_ACC_CHANGED;
}
- if (parent_flags & ZEND_ACC_PRIVATE) {
- child->common.prototype = NULL;
- } else if (parent_flags & ZEND_ACC_ABSTRACT) {
- child->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT;
- child->common.prototype = parent;
- } else if (!(parent->common.fn_flags & ZEND_ACC_CTOR)) {
- child->common.prototype = parent->common.prototype ? parent->common.prototype : parent;
- } else if (parent->common.prototype && (parent->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE)) {
- /* ctors only have a prototype if it comes from an interface */
- child->common.prototype = parent->common.prototype ? parent->common.prototype : parent;
- /* and if that is the case, we want to check inheritance against it */
- parent = child->common.prototype;
- }
-
- if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {
- int error_level;
- const char *error_verb;
- zend_string *method_prototype = zend_get_function_declaration(parent);
- zend_string *child_prototype = zend_get_function_declaration(child);
-
- if (child->common.prototype && (
- child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT
- )) {
- error_level = E_COMPILE_ERROR;
- error_verb = "must";
- } else if ((parent->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) &&
- (!(child->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- !zend_do_perform_type_hint_check(child, child->common.arg_info - 1, parent, parent->common.arg_info - 1) ||
- (ZEND_TYPE_ALLOW_NULL(child->common.arg_info[-1].type) && !ZEND_TYPE_ALLOW_NULL(parent->common.arg_info[-1].type)))) {
- error_level = E_COMPILE_ERROR;
- error_verb = "must";
- } else {
- error_level = E_WARNING;
- error_verb = "should";
+ do {
+ if (!(parent_flags & ZEND_ACC_PRIVATE)) {
+ if (parent_flags & ZEND_ACC_ABSTRACT) {
+ child->common.prototype = parent;
+ } else {
+ zend_function *proto = parent->common.prototype;
+
+ if (parent->common.scope->constructor != parent) {
+ child->common.prototype = proto ? proto : parent;
+ } else if (proto) {
+ if (proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) {
+ /* ctors only have a prototype if it comes from an interface */
+ child->common.prototype = proto;
+ /* and if that is the case, we want to check inheritance against it */
+ parent = proto;
+ } else if (!(proto->common.fn_flags & ZEND_ACC_ABSTRACT)) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ /* Prevent derived classes from restricting access that was available in parent classes (except deriving from non-abstract ctors) */
+ if ((child_flags & ZEND_ACC_PPP_MASK) > (parent_flags & ZEND_ACC_PPP_MASK)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::%s() must be %s (as in class %s)%s", ZEND_FN_SCOPE_NAME(child), ZSTR_VAL(child->common.function_name), zend_visibility_string(parent_flags), ZEND_FN_SCOPE_NAME(parent), (parent_flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
+ }
+
+ if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {
+ int error_level;
+ const char *error_verb;
+ zend_string *method_prototype = zend_get_function_declaration(parent);
+ zend_string *child_prototype = zend_get_function_declaration(child);
+
+ if (child->common.prototype && (
+ child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT
+ )) {
+ error_level = E_COMPILE_ERROR;
+ error_verb = "must";
+ } else if ((parent->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) &&
+ (!(child->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ !zend_do_perform_type_hint_check(child, child->common.arg_info - 1, parent, parent->common.arg_info - 1) ||
+ (ZEND_TYPE_ALLOW_NULL(child->common.arg_info[-1].type) && !ZEND_TYPE_ALLOW_NULL(parent->common.arg_info[-1].type)))) {
+ error_level = E_COMPILE_ERROR;
+ error_verb = "must";
+ } else {
+ error_level = E_WARNING;
+ error_verb = "should";
+ }
+ zend_error(error_level, "Declaration of %s %s be compatible with %s", ZSTR_VAL(child_prototype), error_verb, ZSTR_VAL(method_prototype));
+ zend_string_efree(child_prototype);
+ zend_string_efree(method_prototype);
+ }
}
- zend_error(error_level, "Declaration of %s %s be compatible with %s", ZSTR_VAL(child_prototype), error_verb, ZSTR_VAL(method_prototype));
- zend_string_efree(child_prototype);
- zend_string_efree(method_prototype);
- }
+ } while (0);
}
/* }}} */
zend_string *lowercase_name = zend_string_tolower(ce->name);
lowercase_name = zend_new_interned_string(lowercase_name);
if (!memcmp(ZSTR_VAL(mname), ZSTR_VAL(lowercase_name), ZSTR_LEN(mname))) {
- if (ce->constructor && (!ce->parent || ce->constructor != ce->parent->constructor)) {
+ if (ce->constructor && (!ce->parent || ce->constructor != ce->parent->constructor)) {
zend_error_noreturn(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from traits", ZSTR_VAL(ce->name));
}
ce->constructor = fe;
- fe->common.fn_flags |= ZEND_ACC_CTOR;
}
zend_string_release_ex(lowercase_name, 0);
} else if (ZSTR_VAL(mname)[0] != '_' || ZSTR_VAL(mname)[1] != '_') {
if (ce->constructor && (!ce->parent || ce->constructor != ce->parent->constructor)) {
zend_error_noreturn(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from traits", ZSTR_VAL(ce->name));
}
- ce->constructor = fe; fe->common.fn_flags |= ZEND_ACC_CTOR;
+ ce->constructor = fe;
} else if (zend_string_equals_literal(mname, ZEND_DESTRUCTOR_FUNC_NAME)) {
- ce->destructor = fe; fe->common.fn_flags |= ZEND_ACC_DTOR;
+ ce->destructor = fe;
} else if (zend_string_equals_literal(mname, ZEND_GET_FUNC_NAME)) {
ce->__get = fe;
ce->ce_flags |= ZEND_ACC_USE_GUARDS;
if (ai->cnt < MAX_ABSTRACT_INFO_CNT) {
ai->afn[ai->cnt] = fn;
}
- if (fn->common.fn_flags & ZEND_ACC_CTOR) {
+ if (fn->common.scope->constructor == fn) {
if (!ai->ctor) {
ai->cnt++;
ai->ctor = 1;
static const zend_function_entry zend_funcs_serializable[] = {
ZEND_ABSTRACT_ME(serializable, serialize, NULL)
- ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR)
+ ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
ZEND_FE_END
};
static const zend_function_entry curlfile_funcs[] = {
- PHP_ME(CURLFile, __construct, arginfo_curlfile_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+ PHP_ME(CURLFile, __construct, arginfo_curlfile_create, ZEND_ACC_PUBLIC)
PHP_ME(CURLFile, getFilename, NULL, ZEND_ACC_PUBLIC)
PHP_ME(CURLFile, getMimeType, NULL, ZEND_ACC_PUBLIC)
PHP_ME(CURLFile, setMimeType, arginfo_curlfile_name, ZEND_ACC_PUBLIC)
};
static const zend_function_entry date_funcs_date[] = {
- PHP_ME(DateTime, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+ PHP_ME(DateTime, __construct, arginfo_date_create, ZEND_ACC_PUBLIC)
PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateTime, __set_state, arginfo_date_set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(DateTime, createFromImmutable, arginfo_date_method_create_from_immutable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
};
static const zend_function_entry date_funcs_immutable[] = {
- PHP_ME(DateTimeImmutable, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+ PHP_ME(DateTimeImmutable, __construct, arginfo_date_create, ZEND_ACC_PUBLIC)
PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeImmutable, __set_state, arginfo_date_set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(createFromFormat, date_create_immutable_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
};
static const zend_function_entry date_funcs_timezone[] = {
- PHP_ME(DateTimeZone, __construct, arginfo_timezone_open, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+ PHP_ME(DateTimeZone, __construct, arginfo_timezone_open, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeZone, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeZone, __set_state, arginfo_date_set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(getName, timezone_name_get, arginfo_timezone_method_name_get, 0)
};
static const zend_function_entry date_funcs_interval[] = {
- PHP_ME(DateInterval, __construct, arginfo_date_interval_construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+ PHP_ME(DateInterval, __construct, arginfo_date_interval_construct, ZEND_ACC_PUBLIC)
PHP_ME(DateInterval, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateInterval, __set_state, arginfo_date_set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(format, date_interval_format, arginfo_date_method_interval_format, 0)
};
static const zend_function_entry date_funcs_period[] = {
- PHP_ME(DatePeriod, __construct, arginfo_date_period_construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+ PHP_ME(DatePeriod, __construct, arginfo_date_period_construct, ZEND_ACC_PUBLIC)
PHP_ME(DatePeriod, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DatePeriod, __set_state, arginfo_date_set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(DatePeriod, getStartDate, NULL, ZEND_ACC_PUBLIC)
/* }}} */
static const zend_function_entry php_hashcontext_methods[] = {
- PHP_ME(HashContext, __construct, NULL, ZEND_ACC_PRIVATE | ZEND_ACC_CTOR)
+ PHP_ME(HashContext, __construct, NULL, ZEND_ACC_PRIVATE)
PHP_FE_END
};
*/
static const zend_function_entry Collator_class_functions[] = {
- PHP_ME( Collator, __construct, collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( Collator, __construct, collator_1_arg, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( collator_create ), collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), collator_2_args )
PHP_NAMED_FE( sort, ZEND_FN( collator_sort ), collator_sort_args )
/* }}} */
static const zend_function_entry php_converter_methods[] = {
- PHP_ME(UConverter, __construct, php_converter_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
+ PHP_ME(UConverter, __construct, php_converter_arginfo, ZEND_ACC_PUBLIC)
/* Encoding selection */
PHP_ME(UConverter, setSourceEncoding, php_converter_set_encoding_arginfo, ZEND_ACC_PUBLIC)
* Every 'IntlDateFormatter' class method has an entry in this table
*/
static const zend_function_entry IntlDateFormatter_class_functions[] = {
- PHP_ME( IntlDateFormatter, __construct, arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( IntlDateFormatter, __construct, arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), arginfo_intldateformatter_getdatetype )
* Every 'NumberFormatter' class method has an entry in this table
*/
static const zend_function_entry NumberFormatter_class_functions[] = {
- PHP_ME( NumberFormatter, __construct, arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( NumberFormatter, __construct, arginfo_numberformatter___construct, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( numfmt_create ), arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( format, ZEND_FN( numfmt_format ), arginfo_numberformatter_format )
PHP_NAMED_FE( parse, ZEND_FN( numfmt_parse ), number_parse_arginfo )
* Every 'MessageFormatter' class method has an entry in this table
*/
static const zend_function_entry MessageFormatter_class_functions[] = {
- PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_messageformatter_format )
ZEND_FENTRY( formatMessage, ZEND_FN( msgfmt_format_message ), arginfo_messageformatter_formatmessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
* Every 'ResourceBundle' class method has an entry in this table
*/
static const zend_function_entry ResourceBundle_class_functions[] = {
- PHP_ME( ResourceBundle, __construct, arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( ResourceBundle, __construct, arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC )
ZEND_NAMED_ME( create, ZEND_FN( resourcebundle_create ), arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
ZEND_NAMED_ME( get, ZEND_FN(resourcebundle_get), arginfo_resourcebundle_get, ZEND_ACC_PUBLIC )
ZEND_NAMED_ME( count, ZEND_FN(resourcebundle_count), arginfo_resourcebundle_count, ZEND_ACC_PUBLIC )
*/
static const zend_function_entry Spoofchecker_class_functions[] = {
- PHP_ME(Spoofchecker, __construct, spoofchecker_0_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+ PHP_ME(Spoofchecker, __construct, spoofchecker_0_args, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, isSuspicious, spoofchecker_is_suspicous, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, areConfusable, spoofchecker_are_confusable, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, setAllowedLocales, spoofchecker_set_allowed_locales, ZEND_ACC_PUBLIC)
* Every 'Transliterator' class method has an entry in this table
*/
static const zend_function_entry Transliterator_class_functions[] = {
- PHP_ME( Transliterator, __construct, ainfo_trans_void, ZEND_ACC_PRIVATE | ZEND_ACC_CTOR | ZEND_ACC_FINAL )
+ PHP_ME( Transliterator, __construct, ainfo_trans_void, ZEND_ACC_PRIVATE | ZEND_ACC_FINAL )
PHP_ME_MAPPING( create, transliterator_create, ainfo_trans_create, ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
PHP_ME_MAPPING( createFromRules,transliterator_create_from_rules, ainfo_trans_create_from_rules, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
PHP_ME_MAPPING( createInverse, transliterator_create_inverse, ainfo_trans_void, ZEND_ACC_PUBLIC )
size_t len = ZSTR_LEN(mptr->common.function_name);
/* Do not display old-style inherited constructors */
- if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0
+ if (mptr->common.scope->constructor != mptr
|| mptr->common.scope == ce
|| !key
|| zend_binary_strcasecmp(ZSTR_VAL(key), ZSTR_LEN(key), ZSTR_VAL(mptr->common.function_name), len) == 0)
if (fptr->common.prototype && fptr->common.prototype->common.scope) {
smart_str_append_printf(str, ", prototype %s", ZSTR_VAL(fptr->common.prototype->common.scope->name));
}
- if (fptr->common.fn_flags & ZEND_ACC_CTOR) {
+ if (fptr->common.scope && fptr->common.scope->constructor == fptr) {
smart_str_appends(str, ", ctor");
}
- if (fptr->common.fn_flags & ZEND_ACC_DTOR) {
+ if (fptr->common.scope && fptr->common.scope->destructor == fptr) {
smart_str_appends(str, ", dtor");
}
smart_str_appends(str, "> ");
/* we need to check if the ctor is the ctor of the class level we we
* looking at since we might be looking at an inherited old style ctor
* defined in base class. */
- RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_CTOR && intern->ce->constructor && intern->ce->constructor->common.scope == mptr->common.scope);
+ RETURN_BOOL(intern->ce->constructor == mptr);
}
/* }}} */
return;
}
GET_REFLECTION_OBJECT_PTR(mptr);
- RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR);
+ RETURN_BOOL(intern->ce->destructor == mptr);
}
/* }}} */
PHP_ME(sqlite3, openBlob, arginfo_sqlite3_openblob, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3, enableExceptions, arginfo_sqlite3_enableexceptions, ZEND_ACC_PUBLIC)
/* Aliases */
- PHP_MALIAS(sqlite3, __construct, open, arginfo_sqlite3_open, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+ PHP_MALIAS(sqlite3, __construct, open, arginfo_sqlite3_open, ZEND_ACC_PUBLIC)
PHP_FE_END
};
/* }}} */
PHP_ME(sqlite3stmt, bindParam, arginfo_sqlite3stmt_bindparam, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3stmt, bindValue, arginfo_sqlite3stmt_bindvalue, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3stmt, readOnly, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
- PHP_ME(sqlite3stmt, __construct, arginfo_sqlite3stmt_construct, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR)
+ PHP_ME(sqlite3stmt, __construct, arginfo_sqlite3stmt_construct, ZEND_ACC_PRIVATE)
PHP_FE_END
};
/* }}} */
PHP_ME(sqlite3result, fetchArray, arginfo_sqlite3result_fetcharray, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3result, reset, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3result, finalize, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
- PHP_ME(sqlite3result, __construct, arginfo_sqlite3_void, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR)
+ PHP_ME(sqlite3result, __construct, arginfo_sqlite3_void, ZEND_ACC_PRIVATE)
PHP_FE_END
};
/* }}} */