Arquivos
hhvm/hphp/test/vm/get_defined_vars.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

23 linhas
345 B
PHP

<?php
function f($a=500, $b) {
// $b shouldn't show up
var_dump(get_defined_vars());
}
function modify($arr) {
$arr['a'] += 200;
}
function rvalue_sort($x) { ksort($x); return $x; }
function ref($a) {
$b =& $a;
var_dump(rvalue_sort(get_defined_vars()));
modify(rvalue_sort(get_defined_vars()));
var_dump($b);
}
@f();
ref(20);