PageRenderTime 48ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/array_functions/self_recursive.php

http://github.com/facebook/hiphop-php
PHP | 18 lines | 13 code | 5 blank | 0 comment | 0 complexity | 03002be32e4fe9f4ecb6570e9aece0c1 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?hh
  2. function test($g) {
  3. $GLOBALS['g'] = $GLOBALS['GLOBALS'];
  4. array_replace_recursive($GLOBALS['GLOBALS'], $g);
  5. $GLOBALS['g'] = $GLOBALS['GLOBALS'];
  6. array_merge_recursive($GLOBALS['GLOBALS'], $g);
  7. }
  8. <<__EntryPoint>>
  9. function main_self_recursive() {
  10. $a = darray['g' => $GLOBALS['GLOBALS']];
  11. test($a);
  12. test($GLOBALS['GLOBALS']);
  13. }