* PHP-7.0:
Fixed bug #72594 (Calling an earlier instance of an included anonymous class fatals)
Conflicts:
Zend/zend_compile.c
opline->opcode = ZEND_DECLARE_ANON_CLASS;
}
- zend_hash_update_ptr(CG(class_table), lcname, ce);
- opline->op1_type = IS_UNUSED;
-
+ if (!zend_hash_exists(CG(class_table), lcname)) {
+ zend_hash_add_ptr(CG(class_table), lcname, ce);
+ } else {
+ /* this anonymous class has been included */
+ zval zv;
+ ZVAL_PTR(&zv, ce);
+ destroy_zend_class(&zv);
+ return;
+ }
} else {
zend_string *key;