INIT_CLASS_ENTRY(ce, "Closure", closure_functions);
zend_ce_closure = zend_register_internal_class(&ce TSRMLS_CC);
- zend_ce_closure->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ zend_ce_closure->ce_flags |= ZEND_ACC_FINAL;
zend_ce_closure->create_object = zend_closure_new;
zend_ce_closure->serialize = zend_class_serialize_deny;
zend_ce_closure->unserialize = zend_class_unserialize_deny;
/* ZEND_ACC_EXPLICIT_ABSTRACT_CLASS denotes that a class was explicitly defined as abstract by using the keyword. */
#define ZEND_ACC_IMPLICIT_ABSTRACT_CLASS 0x10
#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS 0x20
-#define ZEND_ACC_FINAL_CLASS 0x40
#define ZEND_ACC_INTERFACE 0x80
#define ZEND_ACC_TRAIT 0x120
INIT_CLASS_ENTRY(ce, "Generator", generator_functions);
zend_ce_generator = zend_register_internal_class(&ce TSRMLS_CC);
- zend_ce_generator->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ zend_ce_generator->ce_flags |= ZEND_ACC_FINAL;
zend_ce_generator->create_object = zend_generator_create;
zend_ce_generator->serialize = zend_class_serialize_deny;
zend_ce_generator->unserialize = zend_class_unserialize_deny;
&& !(parent_ce->ce_flags & ZEND_ACC_INTERFACE)) {
zend_error_noreturn(E_COMPILE_ERROR, "Interface %s may not inherit from class (%s)", ce->name->val, parent_ce->name->val);
}
- if (parent_ce->ce_flags & ZEND_ACC_FINAL_CLASS) {
+ if (parent_ce->ce_flags & ZEND_ACC_FINAL) {
zend_error_noreturn(E_COMPILE_ERROR, "Class %s may not inherit from final class (%s)", ce->name->val, parent_ce->name->val);
}
class_type:
T_CLASS { $$ = 0; }
| T_ABSTRACT T_CLASS { $$ = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
- | T_FINAL T_CLASS { $$ = ZEND_ACC_FINAL_CLASS; }
+ | T_FINAL T_CLASS { $$ = ZEND_ACC_FINAL; }
| T_TRAIT { $$ = ZEND_ACC_TRAIT; }
;
zend_declare_property_null(ce, "embedded", sizeof("embedded") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_null(ce, "reconnect", sizeof("reconnect") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_null(ce, "report_mode", sizeof("report_mode") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
- ce->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ ce->ce_flags |= ZEND_ACC_FINAL;
zend_hash_add_ptr(&classes, ce->name, &mysqli_driver_properties);
REGISTER_MYSQLI_CLASS_ENTRY("mysqli", mysqli_link_class_entry, mysqli_link_methods);
REGISTER_MYSQLI_CLASS_ENTRY("mysqli_warning", mysqli_warning_class_entry, mysqli_warning_methods);
ce = mysqli_warning_class_entry;
- ce->ce_flags |= ZEND_ACC_FINAL_CLASS | ZEND_ACC_PROTECTED;
+ ce->ce_flags |= ZEND_ACC_FINAL;
zend_hash_init(&mysqli_warning_properties, 0, NULL, free_prop_handler, 1);
MYSQLI_ADD_PROPERTIES(&mysqli_warning_properties, mysqli_warning_property_entries);
zend_declare_property_null(ce, "message", sizeof("message") - 1, ZEND_ACC_PUBLIC TSRMLS_CC);
INIT_CLASS_ENTRY(ce, "PDORow", pdo_row_functions);
pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC);
- pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */
+ pdo_row_ce->ce_flags |= ZEND_ACC_FINAL; /* when removing this a lot of handlers need to be redone */
pdo_row_ce->create_object = pdo_row_new;
pdo_row_ce->serialize = pdo_row_serialize;
}
#else
INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods);
phar_ce_archive = zend_register_internal_class(&ce TSRMLS_CC);
- phar_ce_archive->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ phar_ce_archive->ce_flags |= ZEND_ACC_FINAL;
INIT_CLASS_ENTRY(ce, "PharData", php_archive_methods);
phar_ce_data = zend_register_internal_class(&ce TSRMLS_CC);
- phar_ce_data->ce_flags |= ZEND_ACC_FINAL_CLASS;
+ phar_ce_data->ce_flags |= ZEND_ACC_FINAL;
#endif
REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "BZ2", PHAR_ENT_COMPRESSED_BZ2)
if (ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
string_printf(str, "abstract ");
}
- if (ce->ce_flags & ZEND_ACC_FINAL_CLASS) {
+ if (ce->ce_flags & ZEND_ACC_FINAL) {
string_printf(str, "final ");
}
string_printf(str, "class ");
if (modifiers & (ZEND_ACC_ABSTRACT | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
add_next_index_stringl(return_value, "abstract", sizeof("abstract")-1);
}
- if (modifiers & (ZEND_ACC_FINAL | ZEND_ACC_FINAL_CLASS)) {
+ if (modifiers & ZEND_ACC_FINAL) {
add_next_index_stringl(return_value, "final", sizeof("final")-1);
}
if (modifiers & ZEND_ACC_IMPLICIT_PUBLIC) {
Returns whether this class is final */
ZEND_METHOD(reflection_class, isFinal)
{
- _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL_CLASS);
+ _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL);
}
/* }}} */
METHOD_NOTSTATIC(reflection_class_ptr);
GET_REFLECTION_OBJECT_PTR(ce);
- if (ce->create_object != NULL && ce->ce_flags & ZEND_ACC_FINAL_CLASS) {
+ if (ce->create_object != NULL && ce->ce_flags & ZEND_ACC_FINAL) {
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s is an internal class marked as final that cannot be instantiated without invoking its constructor", ce->name->val);
}
REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_IMPLICIT_ABSTRACT", ZEND_ACC_IMPLICIT_ABSTRACT_CLASS);
REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_EXPLICIT_ABSTRACT", ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
- REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_FINAL", ZEND_ACC_FINAL_CLASS);
+ REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IS_FINAL", ZEND_ACC_FINAL);
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", reflection_object_functions);
_reflection_entry.create_object = reflection_objects_new;
--EXPECT--
int(0)
int(32)
-int(64)
+int(4)
int(128)
int(524288)
int(524416)
bool(true)
bool(false)
bool(false)
-int(64)
+int(4)
bool(false)
bool(true)
bool(false)
- Constants [3] {
Constant [ integer IS_IMPLICIT_ABSTRACT ] { 16 }
Constant [ integer IS_EXPLICIT_ABSTRACT ] { 32 }
- Constant [ integer IS_FINAL ] { 64 }
+ Constant [ integer IS_FINAL ] { 4 }
}
- Static properties [0] {
REGISTER_INI_ENTRIES();
REGISTER_TIDY_CLASS(tidy, doc, NULL, 0);
- REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL_CLASS);
+ REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL);
tidy_object_handlers_doc.cast_object = tidy_doc_cast_handler;
tidy_object_handlers_node.cast_object = tidy_node_cast_handler;