Arquivos
hhvm/hphp/test/vm/array_misc.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

33 linhas
464 B
PHP

<?php
class X {
function __destruct() { var_dump(__METHOD__); }
}
function test($a) {
apc_store('foo', array(1 => $a));
$a = apc_fetch('foo');
$a[1] = 'bar';
var_dump($a);
$a = apc_fetch('foo');
$a["1"] = 'bar';
var_dump($a);
$u = new X;
$x =& $u;
$a = apc_fetch('foo');
foreach ($a as $k => $x) {
var_dump($x, $u);
}
$a = apc_fetch('foo');
$a[1] = 'bar';
foreach ($a as $k => $x) {
var_dump($x, $u);
}
}
test(42);