Merge branch 'PHP-8.3'

* PHP-8.3:
  Fixed inorrect QM_ASSIGN elimination
This commit is contained in:
Dmitry Stogov 2023-11-01 09:55:51 +03:00
commit 7fcbedd7df
2 changed files with 16 additions and 0 deletions

View File

@ -172,6 +172,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
&& opline->opcode != ZEND_SWITCH_LONG
&& opline->opcode != ZEND_SWITCH_STRING
&& opline->opcode != ZEND_MATCH
&& opline->opcode != ZEND_MATCH_ERROR
&& zend_optimizer_update_op1_const(op_array, opline, &c)) {
VAR_SOURCE(op1) = NULL;
if (opline->opcode != ZEND_JMP_NULL

View File

@ -0,0 +1,15 @@
--TEST--
Block Pass 006: Inorrect QM_ASSIGN elimination
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--FILE--
<?php
match(match(''){c=>''}){}
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant "c" in %sblock_pass_006.php:2
Stack trace:
#0 {main}
thrown in %sblock_pass_006.php on line 2