}
/* }}} */
+ static void zend_compile_implicit_closure_uses(closure_info *info)
+ {
+ zend_string *var_name;
+ ZEND_HASH_FOREACH_STR_KEY(&info->uses, var_name)
+ zval zv;
+ ZVAL_NULL(&zv);
+ zend_compile_static_var_common(var_name, &zv, 0);
+ ZEND_HASH_FOREACH_END();
+ }
+
+static void zend_check_magic_method_attr(uint32_t attr, const char* method, zend_bool is_static) /* {{{ */
+{
+ if (is_static) {
+ if (!(attr & ZEND_ACC_PUBLIC) || !(attr & ZEND_ACC_STATIC)) {
+ zend_error(E_WARNING, "The magic method %s() must have public visibility and be static", method);
+ }
+ } else if (!(attr & ZEND_ACC_PUBLIC) || (attr & ZEND_ACC_STATIC)) {
+ zend_error(E_WARNING,
+ "The magic method %s() must have public visibility and cannot be static",
+ method);
+ }
+}
+/* }}} */
+
void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_bool has_body) /* {{{ */
{
zend_class_entry *ce = CG(active_class_entry);