Arquivos
hhvm/hphp/test/vm/propagate-array.php
T
ottoni 659da8c6b1 Fix assertion in ref-count optimization
MemElim may transform the source of a DecRefNZ into a constant,
so we shouldn't assert that it's coming from an IncRef.
2013-03-25 13:31:16 -07:00

13 linhas
130 B
PHP

<?php
function foo(&$x, $y) {
$x = array(1,2);
$y = $x;
return $y;
}
$x = 0;
$y = 0;
var_dump(foo($x, $y));
var_dump($x);