zend_error(error_type, "Destructor %s::%s cannot be static", dtor->common.scope->name, dtor->common.function_name);
}
}
+ if (clone) {
+ clone->common.fn_flags |= ZEND_ACC_CLONE;
+ if (clone->common.fn_flags & ZEND_ACC_STATIC) {
+ zend_error(error_type, "Constructor %s::%s cannot be static", clone->common.scope->name, clone->common.function_name);
+ }
+ }
}
return SUCCESS;
}
zend_error(E_COMPILE_ERROR, "Destructor %s::%s() cannot be static", ce->name, ce->destructor->common.function_name);
}
}
+ if (ce->clone) {
+ ce->clone->common.fn_flags |= ZEND_ACC_CLONE;
+ if (ce->clone->common.fn_flags & ZEND_ACC_STATIC) {
+ zend_error(E_COMPILE_ERROR, "Clone method %s::%s() cannot be static", ce->name, ce->clone->common.function_name);
+ }
+ }
ce->line_end = zend_get_compiled_lineno(TSRMLS_C);
#define ZEND_ACC_IMPLICIT_PUBLIC 0x1000
#define ZEND_ACC_CTOR 0x2000
-#define ZEND_ACC_DTOR 0x4000
+#define ZEND_ACC_DTOR 0x4000
+#define ZEND_ACC_CLONE 0x8000
char *zend_visibility_string(zend_uint fn_flags);