summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_opcodes.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-15 17:04:24 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-22 11:12:04 +0100
commita50198d0fef652ca052cda642d6e98a9101eb73f (patch)
tree8bd51746c7418ae0826d527eb57fbebdb67b05d7 /Zend/zend_vm_opcodes.c
parent50ddff94b9989342e66678c311b3abf4e7d5a074 (diff)
downloadphp-git-a50198d0fef652ca052cda642d6e98a9101eb73f.tar.gz
Implement ??= operator
RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator $a ??= $b is $a ?? ($a = $b), with the difference that $a is only evaluated once, to the degree that this is possible. In particular in $a[foo()] ?? $b function foo() is only ever called once. However, the variable access themselves will be reevaluated.
Diffstat (limited to 'Zend/zend_vm_opcodes.c')
-rw-r--r--Zend/zend_vm_opcodes.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_vm_opcodes.c b/Zend/zend_vm_opcodes.c
index b821fcbc8f..871f16176f 100644
--- a/Zend/zend_vm_opcodes.c
+++ b/Zend/zend_vm_opcodes.c
@@ -22,7 +22,7 @@
#include <zend.h>
#include <zend_vm_opcodes.h>
-static const char *zend_vm_opcodes_names[207] = {
+static const char *zend_vm_opcodes_names[208] = {
"ZEND_NOP",
"ZEND_ADD",
"ZEND_SUB",
@@ -230,9 +230,10 @@ static const char *zend_vm_opcodes_names[207] = {
"ZEND_PRE_DEC_STATIC_PROP",
"ZEND_POST_INC_STATIC_PROP",
"ZEND_POST_DEC_STATIC_PROP",
+ "ZEND_COPY_TMP",
};
-static uint32_t zend_vm_opcodes_flags[207] = {
+static uint32_t zend_vm_opcodes_flags[208] = {
0x00000000,
0x00000707,
0x00000707,
@@ -440,6 +441,7 @@ static uint32_t zend_vm_opcodes_flags[207] = {
0x00040307,
0x00040307,
0x00040307,
+ 0x00000105,
};
ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(zend_uchar opcode) {