PageRenderTime 38ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/quick/array-compact.php

http://github.com/facebook/hiphop-php
PHP | 12 lines | 12 code | 0 blank | 0 comment | 0 complexity | 92e2a0529497c9b969f4b760d0bc9757 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 f($a) {
  3. $a["four"] = 4;
  4. return $a;
  5. }
  6. <<__EntryPoint>> function main(): void {
  7. $a = darray[1=>1, 2=>2, 3=>3];
  8. unset($a[1]);
  9. unset($a[2]);
  10. unset($a[3]);
  11. var_dump(f($a));
  12. }