Adds extra condition that the rope var of INIT/ADD must match the
one one END.
--- /dev/null
+--TEST--
+Exception during nested rope
+--FILE--
+<?php
+
+set_error_handler(function() { throw new Exception; });
+
+try {
+ $a = "foo";
+ $str = "$a${"y$a$a"}y";
+} catch (Exception $e) {
+ echo "Exception\n";
+}
+
+?>
+--EXPECT--
+Exception
} else if (brk_opline->opcode == ZEND_ROPE_END) {
zend_string **rope = (zend_string **) EX_VAR(brk_opline->op1.var);
zend_op *last = EX(func)->op_array.opcodes + op_num;
- while (last->opcode != ZEND_ROPE_ADD && last->opcode != ZEND_ROPE_INIT) {
+ while ((last->opcode != ZEND_ROPE_ADD && last->opcode != ZEND_ROPE_INIT)
+ || last->result.var != brk_opline->op1.var) {
ZEND_ASSERT(last >= EX(func)->op_array.opcodes);
last--;
}