1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Files
archived-php-src/ext/opcache/tests/bug77691.phpt
T
Nikita Popov 3f00c9367d Fixed bug #77691
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.
2019-03-04 13:11:12 +01:00

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"
}