mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
3f00c9367d
We cannot replace an op1_def opcode with an ASSIGN, if it also has a used res_def. Usually this doesn't happen because the res_def use can be eliminated first. The example is a case where operand replacement on the res_def use fails.
27 lines
334 B
PHP
27 lines
334 B
PHP
--TEST--
|
|
Bug #77691: Opcache passes wrong value for inline array push assignments
|
|
--FILE--
|
|
<?php
|
|
|
|
if (true) {
|
|
function dump($str) {
|
|
var_dump($str);
|
|
}
|
|
}
|
|
|
|
function test() {
|
|
$array = [];
|
|
dump($array[] = 'test');
|
|
dump($array);
|
|
}
|
|
|
|
test();
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(4) "test"
|
|
array(1) {
|
|
[0]=>
|
|
string(4) "test"
|
|
}
|