}
if (ptr->flags & ZEND_ACC_ABSTRACT) {
if (scope) {
+ /* This is a class that must be abstract itself. Here we set the check info. */
scope->ce_flags |= ZEND_ACC_ABSTRACT;
if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) {
+ /* Since the class is not an interface it needs to be declared as a abstract class. */
+ /* This time we set the flag for the keyword 'abstratc'. */
scope->ce_flags |= ZEND_ACC_ABSTRACT_CLASS;
}
}
#define ZEND_ACC_ABSTRACT 0x02
#define ZEND_ACC_FINAL 0x04
#define ZEND_ACC_INTERFACE 0x08
+/* ZEND_ACC_ABSTRACT is used for abstract classes and methods. Abstract checks work only on this flag. */
+/* ZEND_ACC_ABSTRACT_CLASS denotes that a class was explicitly defined as abstract be using the keyword. */
#define ZEND_ACC_ABSTRACT_CLASS 0x10
#define ZEND_ACC_FINAL_CLASS 0x20
#define ZEND_ACC_IMPLEMENTED_ABSTRACT 0x40