mirror of
https://github.com/php/php-src.git
synced 2026-03-27 09:42:22 +01:00
Otherwise we end up leaving opcodes like FETCH_DIM_W behind. The test case demonstrates a leak in particular.
23 lines
261 B
PHP
23 lines
261 B
PHP
--TEST--
|
|
Inlining of functions with ref arguments
|
|
--FILE--
|
|
<?php
|
|
|
|
function by_ref(&$var)
|
|
{
|
|
}
|
|
function &get_array() {
|
|
$array = [new stdClass];
|
|
return $array;
|
|
}
|
|
function test()
|
|
{
|
|
by_ref(get_array()[0]);
|
|
print "ok!\n";
|
|
}
|
|
test();
|
|
|
|
?>
|
|
--EXPECT--
|
|
ok!
|