com php-src: Merge branch 'PHP-7.4': Zend/zend_compile.c Zend/zend_compile.h Zend/zend_vm_def.h Zend/zend _vm_execute.h
| From: | Nikita Popov | Date: | Thu, 02 May 2019 13:07:04 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.4': Zend/zend_compile.c Zend/zend_compile.h Zend/zend_vm_def.h Zend/zend _vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106018@lists.php.net to get a copy of this message | ||
Commit: 79f41944babaa4d4ae4f1928fcb999feaf9a48b9
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 2 May 2019 15:07:04 +0200
Parents: fe9165449ddc2195a9489b678c78b7d95c812e78 f3e5bbe6f37ce52a9ecd42812389e6aaf3aa2892
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=79f41944babaa4d4ae4f1928fcb999feaf9a48b9
Log:
Merge branch 'PHP-7.4'
Changed paths:
MM Zend/zend_compile.c
MM Zend/zend_compile.h
MM Zend/zend_vm_def.h
MM Zend/zend_vm_execute.h
Diff:
diff --cc Zend/zend_compile.c
index af331bb,6e9b421..a659a2a
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@@ -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);