PageRenderTime 55ms CodeModel.GetById 51ms app.highlight 2ms RepoModel.GetById 1ms 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
 1<?hh
 2
 3function test($g) {
 4  $GLOBALS['g'] = $GLOBALS['GLOBALS'];
 5
 6  array_replace_recursive($GLOBALS['GLOBALS'], $g);
 7
 8  $GLOBALS['g'] = $GLOBALS['GLOBALS'];
 9  array_merge_recursive($GLOBALS['GLOBALS'], $g);
10}
11
12<<__EntryPoint>>
13function main_self_recursive() {
14  $a = darray['g' => $GLOBALS['GLOBALS']];
15
16  test($a);
17  test($GLOBALS['GLOBALS']);
18}