summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-06-21 21:56:06 +0000
committerMarcus Boerger <helly@php.net>2003-06-21 21:56:06 +0000
commit60c7abac618d9ac8dc50b33d7a33164dc81e9fbd (patch)
treee2bd7c6a28f1f184d0c09f2476cabf51e42ca41b /Zend/zend_compile.c
parent2df990c803b2fe32a6705f86f549e283c8ae93e5 (diff)
downloadphp-git-60c7abac618d9ac8dc50b33d7a33164dc81e9fbd.tar.gz
Add final classes
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 3f2b804800..a876e941ac 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1834,6 +1834,9 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce)
&& !(parent_ce->ce_flags & ZEND_ACC_INTERFACE)) {
zend_error(E_ERROR, "Interface %s may not inherit from class (%s)", ce->name, parent_ce->name);
}
+ if (parent_ce->ce_flags & ZEND_ACC_FINAL_CLASS) {
+ zend_error(E_ERROR, "Class %s may not inherit from final class (%s)", ce->name, parent_ce->name);
+ }
ce->parent = parent_ce;
/* Inherit interfaces */