Commit 2db00a5d166 for php
commit 2db00a5d166cfc633150499d6b5ca9f9d094ca26
Merge: 2ba372b9614 4f40b69ffa5
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date: Fri Oct 9 18:51:37 2026 +0200
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
Fix GH-24218: Invalid opcode for count() of a literal array without SCCP
diff --cc Zend/zend_vm_def.h
index 86a66895351,f107f722526..cb00d358684
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@@ -9657,7 -9538,7 +9657,7 @@@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_CO
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZEND_VM_TYPE_SPEC_HANDLER(ZEND_COUNT, (op1_info & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) == MAY_BE_ARRAY, ZEND_COUNT_ARRAY, CV|TMP, UNUSED)
-ZEND_VM_TYPE_SPEC_HANDLER(ZEND_COUNT, op->op1_type != IS_CONST && (op1_info & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) == MAY_BE_ARRAY, ZEND_COUNT_ARRAY, CV|TMPVAR, UNUSED)
++ZEND_VM_TYPE_SPEC_HANDLER(ZEND_COUNT, op->op1_type != IS_CONST && (op1_info & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) == MAY_BE_ARRAY, ZEND_COUNT_ARRAY, CV|TMP, UNUSED)
{
USE_OPLINE
zend_array *ht = Z_ARRVAL_P(GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R));
diff --cc Zend/zend_vm_execute.h
index e9d66ab066f,f0b244f53c3..53c692eda37
Binary files differ