php-src/Zend/tests/assign_obj_op_cache_slot.phpt
Nikita Popov d0860f67ca Fix cache slot assignment for ASSIGN_OBJ_OP
ASSIGN_OBJ_OP stores the cache slot in OP_DATA, so this ended up
overwriting the binop opcode instread.
2021-09-30 14:34:12 +02:00

15 lines
210 B
PHP

--TEST--
The ASSIGN_OBJ_OP cache slot is on the OP_DATA opcode
--FILE--
<?php
function test($a) {
$b = "x";
$a->$b = 1;
$a->$b &= 1;
var_dump($a->$b);
}
test(new stdClass);
?>
--EXPECT--
int(1)