]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 2 May 2019 13:07:04 +0000 (15:07 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 2 May 2019 13:07:04 +0000 (15:07 +0200)
1  2 
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index af331bb3f1ed9793565a3726e73e569fd41ea333,6e9b42151fc7fbea750e5e2c80403e66ad1b1874..a659a2a9bb4fccf5b4fb641486c63caa787f490d
@@@ -5497,20 -5626,16 +5596,30 @@@ static void zend_compile_closure_uses(z
  }
  /* }}} */
  
+ 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);
Simple merge
Simple merge
Simple merge