Enforce semantics: Classes cannot extend Interfaces

This commit is contained in:
Marcus Boerger 2004-08-26 22:59:25 +00:00
parent b1d43bac61
commit ec4f576cb3

View File

@ -2125,6 +2125,10 @@ ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *c
ce = *pce;
}
if (parent_ce->ce_flags & ZEND_ACC_INTERFACE) {
zend_error(E_COMPILE_ERROR, "Class %s cannot extend from interfac %s", ce->name, parent_ce->name);
}
zend_do_inheritance(ce, parent_ce TSRMLS_CC);
ce->refcount++;