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

17 linhas
300 B
PHP

<?
$GLOBALS['foo'] = array();
$GLOBALS['foo']['bar'] = 0xba53ba11;
$GLOBALS['bar'] = 0xdeadbeef;
function byRef(&$a) {
$a >>= 16;
}
var_dump($GLOBALS['foo']);
var_dump($GLOBALS['bar']);
byRef($GLOBALS['foo']['bar']);
byRef($GLOBALS['bar']);
var_dump($GLOBALS['foo']);
var_dump($GLOBALS['bar']);