diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index d448ca1d8b7..63feb78519e 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -2396,8 +2396,8 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op if (!(opline->op1_type == IS_CONST && (opline->op2_type == IS_CONST || (opline->op2_type == IS_UNUSED - && (opline->op2.num == ZEND_FETCH_CLASS_SELF - || opline->op2.num == ZEND_FETCH_CLASS_PARENT))))) { + && ((opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF + || (opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT))))) { break; } if (!zend_jit_fetch_static_prop(&ctx, opline, op_array)) { diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 7fd1c3fa6e3..be4fe750541 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -6086,8 +6086,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par if (!(opline->op1_type == IS_CONST && (opline->op2_type == IS_CONST || (opline->op2_type == IS_UNUSED - && (opline->op2.num == ZEND_FETCH_CLASS_SELF - || opline->op2.num == ZEND_FETCH_CLASS_PARENT))))) { + && ((opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF + || (opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT))))) { break; } if (!zend_jit_fetch_static_prop(&ctx, opline, op_array)) {