summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-08-16 12:55:28 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-08-23 17:21:23 +0200
commitd1157cbce1f324362d1fe05aff3fb53ef248ad74 (patch)
treeffff618d2883ff86ce12da7bb04ffa5c0582ede5 /Zend/zend_compile.h
parent8807889ac280503d5cd1cd05804a6f278a40300e (diff)
downloadphp-git-d1157cbce1f324362d1fe05aff3fb53ef248ad74.tar.gz
Relax closure $this unbinding deprecation
Only deprecate unbinding of $this from a closure if $this is syntactically used within the closure. This is desired to support Laravel's macro system, see laravel/framework#29482. This should still allow us to implement the performance improvements we're interested in for PHP 8, without breaking existing use-cases.
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r--Zend/zend_compile.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index a3dd2b2272..120d92beb5 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -337,6 +337,9 @@ typedef struct _zend_oparray_context {
/* function is a destructor | | | */
#define ZEND_ACC_DTOR (1 << 29) /* | X | | */
/* | | | */
+/* closure uses $this | | | */
+#define ZEND_ACC_USES_THIS (1 << 30) /* | X | | */
+/* | | | */
/* op_array uses strict mode types | | | */
#define ZEND_ACC_STRICT_TYPES (1U << 31) /* | X | | */