PageRenderTime 52ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/ext_array/array_map-globals.php

http://github.com/facebook/hiphop-php
PHP | 19 lines | 12 code | 6 blank | 1 comment | 0 complexity | 251e7e1cbb9cb9462fbb9235eaf7dcee 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. // Check MixedArray::MakeReserveLike on NVT (GitHub #3065)
  3. function check_global($arg) {
  4. ExtArrayArrayMapGlobals::$x = 1;
  5. return false;
  6. }
  7. abstract final class ExtArrayArrayMapGlobals {
  8. public static $x = 0;
  9. }
  10. <<__EntryPoint>> function main(): void {
  11. array_map(fun('check_global'), $GLOBALS['GLOBALS']);
  12. print ExtArrayArrayMapGlobals::$x."\n";
  13. }